Book Reviews

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 webmaster@birmingham.pm.org.

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 webmaster@birmingham.pm.org to rectify the situation.

Perl Books

Static Link: http://birmingham.grango.org/reviews/8

 
Web, Graphics and Perl/Tk
Title:Web, Graphics and Perl/Tk
Author(s):Various
ISBN:0-596-00311-0
Publisher:O'Reilly Media
Reviewer:Kevin Taylor

Please note this review has previously been published online, and appears here courtesy of it's author and Northants LUG

This is the second of 3 books described as 'The Best of The Perl Journal'. I reviewed the first book back in January, and was very impressed. Does this live up to the same standard? I believe it does.

There are a range of topics covered in this book, from all aspects of using Perl in relation to the web (the largest section of the book) through some general Perl and graphics topics, finishing with a series of articles about Perl/Tk.

I have to say that there is a much greater chance of you already having a Perl book covering at least one of these areas, when compare with the subject matter from the first book of the series ... The subjects discussed don't have as much 'wow, I didn't know you could do that' about them as with the first book. Having said that, there is still quite a bit of good stuff, and written by such people as Steve Lidie, Lincoln D. Stein, Mark Jason Dominus, et al. Read on ...

Part 1 - Web

We start off with Lincoln D. Stein describing basic CGI principles, with the help of his CGI.pm module. This is expanded on with a discussion of state and cookies. Then we have several chapters about mod_perl, from installation to use. Plenty of examples and walk-throughs are provided. I particularly liked the chapter about proxying with mod_perl, which included a bit of GD too (in order to provide a blank graphic when filtering out ads).

The next bit covers client-side Perl/web stuff particularly LWP. Again, there is a nice range of topics covered (the '5 quick hacks' was quite illustrative).

HTML parsing is the topic of the next few chapters. The discussion of using HTML::Parser was very good. Very easy to follow and you get thrown in to tinkering straight away. I've used Perl for XML parsing, but never really applied these same principles to HTML (sounds obvious now, really :) The 'Scanning HTML' chapter then provides a slightly different slant on the subject. One of the nice things about this collection is that the same topics are often covered in different ways like this, but with each way focusing on a different aspect.

A curious chapter is next, about writing a web-spider in a single line of Perl ... This is followed by a chapter about webpluck. This is a discussion of the tool by its author, Ed Hill.

Lincoln D. Stein is back next, considering testing of web servers and scripts, following by a general CGI/Perl security.

The last few chapters in this section cover a selection of topics. These are the sorts of chapters I quite like, and come to expect from this sort of book - i.e. odd topics that pop up. The first covers Mason (ok, so that's not that odd, but I didn't know much about it). Then comes a couple examples of using Perl to do strange things to HTML pages ... and finally a chapter about WAP/WML.

Graphics

This section contains a real miscellany of topics. The first continues the CGI theme, linking up with gnuplot to create a chart that may be returned via CGI. Then a couple of articles about the GD library.

Next up is a chapter about OpenGL. This covers a lot of the basic concepts of 3D graphics programming and only then gets into some Perl. The provided Perl is quite basic, and the reader is referred to the books website for a better, more complex example.

Ray Tracing comes next. Following in the style of the previous chapter, there is more theory than code, but again, if you download the example program, you'll have a real example to work with.

Perl and the Gimp? Yep - its possible to write plug-ins for the Gimp using Perl, and the next chapter talks you through the basics. Glade is covered next (a user-interface builder for Gnome applications), followed by a chapter which covers how to use Gtk-Perl to create a Gnome Panel Applet.

The final chapter is another one of those limited application, but very interesting topics. In this case its all about capturing video in real time and processing it. This is a good overview to (what I would imagine is) a new subject for many readers.

Perl/Tk

Having read/reviewed both of O'Reilly's books about Perl/Tk, I wasn't sure what to expect from this section ... is it just regurgitating this other material? Thankfully no (well, not quite).

The first chapter covers the basic Perl/Tk 'stuff' in a kind of reference way, i.e. just listing the widgets really. My only comment is that it would have been nice to have a picture of a typical widget (making scanning them easier). This is followed by a 'getting started' chapter, which quickly moves from 'Hello World' to plotting a function on a Canvas.

Next up are a couple of sample applications, with descriptions, followed by several chapters expanding on different aspects of Perl/Tk - events, geometry managers, the Canvas and finally the Tree widget.

These chapters are slightly different to the rest of the book, in that they are 'tasters' of Perl/Tk without lots of details. For details, you need another book. As 'tasters' (or just as alternative inspiration) the articles are good.

Summary

Well, as before, if you don't already get TPJ, then this is a great way to build up a library of 'curious' articles about your favourite language ...

The 3rd book is titled 'Games, Diversions and Perl Culture' and sounds like a return to the slightly off-beat topics of the first book. Watch this space.

- Kevin - 7th May 2003