The following book reviews are the copyright of their respective authors and no part should be reproduced without the express permission of the author. Publishers and Authors of the books reviewed may reproduce the whole or extracts of a review for their book. To request copyright permission please email email@example.com.
All the reviews herein are the opinions of the reviewer and are not necessarily the views of Birmingham Perl Mongers and its members. If you feel a review or comment has been made in error, please contact firstname.lastname@example.org to rectify the situation.
Static Link: http://birmingham.pm.org/reviews/53
|Title:||Wicked Cool Perl Scripts|
OK, let's start with the obvious. The title.
"Wicked Cool Perl Scripts"
Yes, that's right. "Wicked Cool". I can only assume that this is in some way meant to appeal to "the kids" but in reality it comes across like an invitation to watch your parents dance to Blink 182. And yes, that's about as far away from "Wicked Cool" as you can get.
But it's the content that matters, and despite the title, "Wicked Cool Perl Scripts" does look like it might be quite a good book. Unlike most tutorials which teach the reader one language feature at a time, this book presents useful scripts in their entirety and then walks through the code, highlighting the important aspects of each script. I really like the idea of this, it has the potential to be much more inspirational than teaching from a reference book.
While reading through "Wicked Cool Perl Scripts" though, I got quite confused as to who exactly the book was aimed at. The introduction states that a working knowledge of Perl and CPAN is expected, i.e. the reader will already know how to install modules and navigate the Perl documentation. But then some of the scripts, particularly in the "CGI Programs" chapter are so simple as to be trivial. The "Errata Submission Form" script is just another FormMail.pl, and so even fails to satisfy the author's own definition of "cool" (i.e. to "solve a difficult problem").
Look at the state of web development today. Take Google Maps or GMail as an example, tools which blur the definition between a website and an application. They are cool. Show me how to use Perl frameworks such as OpenThought and Catalyst to do something similar and yes, that would be cool. But calling a "Guest Book" script for a website "Cool" in 2006 is distinctly behind the times.
Aside from this, "Wicked Cool Perl Scripts" would almost make it as a useful beginners book if the actual quality of the code was good enough to learn from. Unfortunately, several of the scripts contain fundamental errors and even some serious security holes.
The "Visitor Counter" script displays a graphical website hit counter, as was much beloved by "personal home page" authors in the 1990s. But the fact that this script is presented with no form of file locking, or any acknowledgement of the race condition that this causes leaves me with serious doubts as to general quality of code presented throughout the book.
It doesn't take long to find another red flag, this time in a simple intrusion detection script. The aim is to lock out hackers from a web server by updating the machine's routing table, and while the author does admit that the approach is limited, I would still expect the code to be robust. However the "/sbin/route" command is invoked by the Perl code
system("/sbin/route add $who reject");
which means that the full command line will be passed to the shell for processing - so if the $who variable contained ";rm -rf / " or some other malicious data then the system is wide open to attack, noting of course that in order to run the "/sbin/route" command anyway the script will need to be running as the root user.
The code should have been written as
in order to avoid the shell and protect against manipulation of the $who variable. It is all the more ironic that this script is designed to prevent hacking attempts and yet can offer hackers an easier way in!
So as you can probably guess, there is no way that I can recommend "Wicked Cool Perl Scripts", even as a resource for beginners. It was a good idea that has unfortunately suffered badly from poor execution.
We are one of the UK's largest Perl user groups, representing Birmingham UK to the international Perl community since 2000. We hold monthly social and technical presentations, and several of our members are now regular attendees and speakers at the YAPC::Europe Perl Conferences.
For further information about Birmingham.pm, please read our Frequently Asked Questions page.
For details about joining our mailing list, please Click Here for more details.
No meeting currently scheduled
8 Jun - Brum.pm Social
13 Jul - Brum.pm Social
Download the Birmingham.pm ICalendar
or subscribe to our Google Calendar
Aberdeen Perl Mongers
Bath Perl Mongers
Birmingham Perl Mongers
Bristol Perl Mongers
Devon & Cornwall Perl Mongers
Edinburgh Perl Mongers
Glasgow Perl Mongers
London Perl Mongers
Milton Keynes Perl Mongers
North of England Perl Mongers
Nottingham Perl Mongers
Southampton Perl Mongers
Thames Valley Perl Mongers
• Linux System Programming
• Mastering Perl
• GIMP 2 for Photographers
• Minimal Perl
• Wicked Cool Perl Scripts
• Red Hat Linux 9 Unleashed
• IRC Hacks - 100 Industrial-Strength Tips & Tools
• eBay Hacks - 100 Industrial-Strength Tips & Tools
• Exploiting Software - How To Break Code
• Mac OS X Unleashed, 2nd Edition
* New Reviews
.. More Reviews