Perl 6 Now: The Core Ideas Illustrated with Perl 5
Scott Waters
Apress, 2005
I had mixed feelings about reading this book caused by my current views of Perl 6. Some of what I have heard about Perl 6 is exciting and I really can’t wait. Other things I have heard fill me with dread. I can’t believe Larry Wall (and the cast of thousands) would want to do these things to the Perl programming language. Like many people using Perl, I find the reports coming from the development of Perl 6 are a source of mixed emotions.
What I was hoping to get from this book was a little better clarity on the whole Perl 6 issue. Surprisingly, that’s exactly what I got. Scott Walters very clearly covers some of the significant changes from Perl 5 to Perl 6. He introduces several modules that can be used to mimic Perl 6 syntax and functionality now. He also carefully explains which of these modules are not appropriate for production code.
Throughout the book, he explains the differences in syntax and semantics between Perl 5 and Perl 6. To make the concepts clearer, he illustrates most of them with Perl 5, Perl 5 with Perl6 modules, and with (the proposed) Perl 6 syntax. In the process, Walters explains each change and some of the implications. He clearly lays out the points where the examples are pretty solid and where the Perl 6 definition is still in flux.
Sometimes Walters spent quite a bit of time on an aspect of Perl 5 modules without telling you up front about the relation to Perl 6. The example that is fresh in my mind is the long section in Chapter 7 about the Perl Data Language (PDL). In this chapter, he explains the PDL module and many things you can do with it.
To drive his points home, he has a very interesting (and long) example on manipulating audio in the MOD file format. This example is relatively extensive and does a good job of exercising the PDL module. I feel that I got a much better grounding in PDL than I had previously. But, through this entire section I kept wondering what does this have to do with Perl 6. Eventually, we discover that Perl 6 will support this kind of functionality natively and a separate module will not be needed.
Except for that example and the discomfort I’m still feeling for some of the changes proposed for Perl 6, I can’t really think of anything bad to say about this book. Overall, I enjoyed it. There are a few features that Walters explained that I am now really looking forward to. (There are others I’m still not happy about. We’ll see how it all shakes out in the end.)
If you are looking to get an understanding of Perl 6 and you can’t just absorb information directly from Larry Wall’s Apocalypses, this book will give you a bit more of the flavor of Perl 6. If you are perfectly happy with Perl 5 and don’t know why anyone would change it, this book will not change your mind. If you are new to Perl, this is not the book to start with. But, if you are interested in Perl 6 and want to know more, or would like to see how people are pushing Perl 5, this book is definitely a treat.