|Problems? Is your data what you think it is?|
CGI Programming with Perlby thomas895 (Hermit)
|on Dec 29, 2011 at 22:46 UTC||Need Help??|
Item Description: "Creating Dynamic Web paes"
Review Synopsis: A good book, especially for those starting out with CGI/Perl
I'm surprised this hasn't been put here many years ago. This book is a great tool for those who have at least some knowledge about Perl, but want to apply it to CGI programming.
In the beginning, the authours describe the basics of HTTP 1.1, as well as how to configure an Apache server(this section is long outdated, as the book was written in 2000). You are required to know at least a little about headers.
Next, the book describes the CGI interface. This is one of the more important sections of the book, as many of the examples later on depend on the variables described here. This section also outlines a few of the HTTP status codes and what they mean.
After that, the authours describe HTML forms, and how they tie into CGI. There really isn't much to see here that cannot be found in other HTML books.
Moving on, Lincoln Stein's CGI.pm module is discussed, specifically parameter access. File uploading is also briefly discussed, and with the world as it is today, this can prove to be a handy tool.
Next, the book describes HTML Templates, and some of the many systems you can use. SSI is discussed in a relatively large amount of detail, as is HTML::Template. There is also an example using HTML::Embperl, which is quite basic, but shows what you can do. This section requires that you know a bit more about Perl.
In the next chapter, web security is discussed, such as the -T switch and precautions to be used with pipes and shell commands. This is probably discussed in most other books about Perl as well, though.
Sending email is discussed in the following section, but you would get a more verbose explanation by consulting a book specifically talking about Perl and email. Therefore, the examples provided here are rather simple. However, they can be useful if you just need a simple hack for something.
Data persistence, also important, is discussed next. The examples provided here are somewhat outdated(there are modern, better methods), but they work for simple applications. SQL is discussed next(although not very much), and how to use the DBI module along with DBD::CSV as an address book.
Maintaining state is also discussed, but like Data persistence, this section is also rather outdated. A simple webshop is shown; alas, this produces may errors under modern versions of Perl(made for Perl 5.005). Unfortunately, this example is also incomplete, and it may not even work at all.
Searching the webserver and graphics creation is also discussed, but the former is irrelevant in today's world. The latter is still applicable, and is definitely worth reading. Again, because this is not a book about GD/Perl, you may wish to consult another book for more detailed examples regarding that.
Middleware and XML requires a lot more knowledge about Perl. This section is probably not for beginners. It shows a script which relies on a feature of Netscape(which is not existent anymore).
And lastly, the book goes over efficiency, optimization, and debugging. Devel::ptkdb is shown in the latter category, as well as how to use the standard Perl debugger.
tl;dr? In summary, this book is optimal for beginners at the start, but may require more knowledge of Perl later on. If you already know Perl, the CGI aspect of it will be a breeze.