[Memphis.pm] 2 questions

Brock Sides bsides at towery.com
Mon Mar 20 10:24:59 CST 2000


On Sun, 19 Mar 2000, cameron walker wrote:

> Brock,
>
> thanks for the answer on the file upload widget. I worked with perl a
> lot about 4 years ago and have just started working with it again. This
> 'use CGI' thing shows me just how much has been added. My old perl book,
> of course, has nothing about that call in there. Id guess there's a lot
> that it no longer covers at this point.
>
> With that in mind Im looking for reccomendations on an up-to-date perl
> book. One that covers the CGI module in depth would be nice but I can
> buy that seperately if neccessary.
>
> Thx

I'm assuming your old perl book doesn't cover release 5, which is where
modules were introduced. 

There are lots of good perl books out there. Ones I can recommend, off
the top of my head:

Programming Perl (the Camel book), by Wall, Christiansen, and Schwartz.
Learning Perl, by Christiansen and Schwartz.
Effective Perl Programming, by Schwartz.
The Perl Cookbook, by Christiansen.
Advanced Perl Programming, by Srinivasan.

If you can only buy one, get the Perl Cookbook, especially if you
already know the basics of the language. It'll teach you the Perl
idioms, so your programs don't look like they were written in C. (Remember
the old joke, "A good Fortran programmer can write Fortran programs in any
language.")

I can't personally recommend it, since I haven't read it, but Lincoln
Stein, the author of CGI.pm, has written "The Official Guide to
Programming with CGI.pm".

And don't forget that perl itself, and almost all of its modules, come
with extensive documentation. Start out with "perldoc perldoc and
"perldoc perl", and go from there. If you'd like nice printable versions,
run the pod files (e.g. /usr/lib/perl5/5.00503/pod/perl.pod) through
pod2html. The pod documentation for the modules is contained
in the .pm files themselves.

There's not really that much to CGI programming per se. Parse the query
string (done automatically for you by CGI::param), write to standard
out, and use the -T flag to turn on taint checking. (See the perlsec man
page.) I personally find the full blown OO interface provided with CGI.pm
to be overkill. All I use is "CGI qw(param)" to parse the query string and
"CGI::Carp qw(fatalsToBrowser)" so I don't have to pick through the web
server logs to get the error messages. 

--
Brock Sides
Unix Systems Administration
Towery Publishing
bsides at towery.com




----------------------------------------------------------------------------
To unsubscribe, please send email to majordomo at pm.org
with 'unsubscribe memphis-pm-list' in the body of the message.
----------------------------------------------------------------------------




More information about the Memphis-pm mailing list