New Features of Perl 5.14: Non-destructive Substitution
Perl 5.14 adds non-destructive substitution.
Perl 5.14 adds non-destructive substitution.
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…
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…
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…
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…
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…
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…
Using Module::Build, using Swing from Perl, turning modules into scripts, adding mocks to test fixtures-it’s time for more Perl lightning articles!
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….
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…
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,…
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…
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…
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…
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.
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…
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>…
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…
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…