As a professional software developer who writes in many languages for many
reasons, I've written more than a few scripts in Perl. I often became
frustrated, however, when implementing certain object-oriented designs in
Perl. So much that I eventually abandoned Perl's object model altogether.
It was as if the object-oriented design I'd come to rely on was suddenly
burdensome overkill. Now I understand why.
Design Patterns (Gamma et al.) was (and is) a hugely popular and important
book for OO developers. It has become so well regarded, in fact, that
many developers I know now believe that the best solution to most problems
is an object-oriented one. Perlish Patterns encourages the reader
... More > to
instead consider Design Patterns as a collection of important problems
that happen to have OO solutions. Many of them, it turns out, have more
Perlish solutions as well. That is what this book is about. Of course,
the author also reminds us that Perl has a full object system and,
especially as your problem complexity increases, you may still want to
fall back on the object-orient solutions found in Design Patterns.
While accessible to the beginning Perl student, this is not a book about
beginning in Perl. The author does assume some very basic knowledge of
Perl. For example, the reader should already know how to create a simple
"Hello world" program, be familiar with some basic built-ins (like 'print')
and know what a blessed reference is.
The book is divided into two parts. Part I covers some basic (and not so
basic) techniques that will be useful throughout Part II. Part I
introduces data containers, closures, mixins, and recursion. Part I,
especially the clear explanations for dealing with references, was worth
the price of admission for me. It seems I always have to look up some
this after being away from Perl for too long.
Part II describes the patterns themselves. In comparing the organization
here to that in Design Patterns you will find that while many patterns
have their own chapter, some closely related patterns have been grouped
together. The last chapter contains a larger collection of patterns that
the author felt required little discussion, either because he considered
the original object-oriented solution to be the preferred one or because
the implementation in Perl was too simple to require its own chapter.
Perlish Patterns changed the way I think about and approach writing
programs in Perl. More importantly, it's made programming in Perl more
enjoyable, more fun. < Less