perl5i Makes More Simple Things Simple
Suppose that you want to load a module dynamically (you have the name in a scalar), then alias a function from that module to a new name in another class. In other words, you want a renaming import. How do…
Read it
Idioms, or How to Write Perlish Perl
Any language—programming or natural—develops idioms, or common patterns of expression. The earth revolves, but we speak of the sun rising or setting. We talk of clever hacks and nasty hacks and slinging code. We ping each other on IRC to…
Read it
Programming is Hard, Let's Go Scripting...
I think, to most people, scripting is a lot like obscenity. I can’t define it, but I’ll know it when I see it. Here are some common memes floating around: Simple language “Everything is a string” Rapid prototyping Glue…
Read it
Lightning Strikes Four Times
by Mike Friedman Good software design principles tell us that we should work to separate unrelated concerns. For example, the popular Model-View-Controller (MVC) pattern is common in web application designs. In MVC, separate modular components form a model, which…
Read it
Using Java Classes in Perl
I started a new job recently to refocus my career from systems administration to web development. Part of that move meant using Java as my primary language at work and using a relatively new technology from the Java Community…
Read it
Hash Crash Course
When I teach about hashes, I do what most Perl tutors and tutorials do: I introduce the hash as a “dictionary”: a mapping between one thing and another. The classic example, for instance, is to have a set of…
Read it
Still More Perl Lightning Articles
Using Module::Build, using Swing from Perl, turning modules into scripts, adding mocks to test fixtures-it’s time for more Perl lightning articles!
Read it
Advanced Subroutine Techniques
In “Making Sense of Subroutines,” I wrote about what subroutines are and why you want to use them. This article expands on that topic, discussing some of the more common techniques for subroutines to make them even more useful….
Read it
More Advancements in Perl Programming
Around Easter last year, I finished writing the second edition of Advanced Perl Programming, a task that had been four years in the making. The aim of this new edition was to reflect the way that Perl programming had…
Read it
Logic Programming with Perl and Prolog
Computing languages can be addictive; developers sometimes blame themselves for perceived inadequacies, making apologies for them. That is the case, at least, when one defends his or her language of choice against the criticism of another language’s devotee. Regardless,…
Read it
Making Sense of Subroutines
Editor’s Note: This article has a followup in Advanced Subroutine Techniques. A subroutine (or routine, function, procedure, macro, etc.) is, at its heart, a named chunk of work. It’s shorthand that allows you to think about your problem in…
Read it
Ten Essential Development Practices
The following ten tips come from Perl Best Practices, a new book of Perl coding and development guidelines by Damian Conway. 1. Design the Module’s Interface First The most important aspect of any module is not how it implements…
Read it
Understanding and Using Iterators
The purpose of this tutorial is to give a general overview of what iterators are, why they are useful, how to build them, and things to consider to avoid common pitfalls. I intend to give the reader enough information…
Read it
More Lightning Articles
Customize Emacs with Perl, debug your programs with line tracing, mock the DBI for testing, and manage buffering effectively-four short articles for Perl programmers.
Read it
Why Review Code?
Richard Gabriel of Sun Microsystems suggests that beginning programmers should study the source code for great works of software as part of a Master of Fine Arts course in software. Prominent Extreme Programmers talk about finding the Quality Without a…
Read it
Building a Finite State Machine Using DFA::Simple
I am converting some articles from MS Word to HTML by hand. I often use bulleted outlines so I face a lot of work creating lists with nested sub-lists. It didn’t take opening and closing many <ul> and <li>…
Read it
Lightning Articles
Simon Cozens Serendipity - it means those occasions when things come together to give you moments of inspiration. While preparing perl.com one week, I was editing an article on how to give lightning talks by Mark Fowler and at…
Read it
Building Applications with POE
Earlier, we talked about the fundamental principles of application design with POE. Now it’s time to put my money where my mouth is and build some actual working code. To make life a bit easier, let’s lay out a…
Read it
Application Design with POE
Day in and day out, I write large applications in perl. I’m cursed I tell you. While large scale, long-running applications in pure perl may sound fairly easy to write, they are not. Perl, beyond a certain size and…