Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

CGI Programming with Perl

by thomas895 (Hermit)
on Dec 29, 2011 at 22:46 UTC ( #945565=bookreview: print w/ replies, xml ) Need Help??

Order CGI Programming with Perl

Item Description: "Creating Dynamic Web paes"

Review Synopsis: A good book, especially for those starting out with CGI/Perl

Introduction

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.

Review

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.
After the basics, the book describes how to generate HTML using CGI.pm compared to directly placing the markup in the script.

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.

JavaScript is also discussed, but it requires that you know the basics of it. WDDX.pm is also briefly touched on, but the example is rather simple, so you would probably need to consult another book to learn more about CGI an JS.

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.

Summary

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.

Comment on CGI Programming with Perl
Re: CGI Programming with Perl
by Anonymous Monk on Dec 30, 2011 at 07:31 UTC

    this section is long outdated, as the book was written in 2000

    FWIW, it was written in 1996, and configuring apache hasn't radically changed in that time :)

      It makes references to the files srm.conf and access.conf, which haven't been used in a very long time.
      You are right in the sense that the configuration itself hasn't changed, but users unfamiliar with Apache could get confused trying to look for those files.

      ~Thomas~

Back to Reviews

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: bookreview [id://945565]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-09-21 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (175 votes), past polls