QA

 <  Day Day Up  >  

Q&A

Q1:

I don't have the CGI module loaded. Do I have to use it?

A1:

Quite frankly, yes. CGI is not an easy protocol to get right. Many programs that are published try to replicate the CGI module's functionality ”and do so poorly. They are riddled with security problems and incompatibilities; plus, they do not follow Internet Standards as they should. In Hour 16, "The Perl Community," you learned why "reinventing the wheel" is a bad thing. CGI is an incredibly hard wheel to reinvent, and neither you nor I would get it right the first time or the hundredth time.

The Perl CGI module included with the standard distribution has been tested by hundreds of thousands of programmers and is very robust. Use it.

As I explain in Appendix A, you can install the module for just your use, if necessary. You don't have any excuse not to use it. All the examples in this book require the CGI module, and the explanations assume you have it installed.

Q2:

I have this copy of cgi-lib.pl . Can I use it instead?

A2:

You really shouldn't. All the functionality of cgi-lib.pl is in the CGI module. The cgi-lib.pl library is quite old and is no longer being maintained .

Q3:

Why does everyone use Perl for CGI ? Why not C or TCL?

A3:

Perl has features that make it particularly useful for CGI. The short list is as follows :

  • Perl has excellent text-handling capabilities.

  • Perl's tainting capabilities ”you'll learn about them soon ”help make it a secure language for doing CGI programs.

  • Perl is an excellent glue language, good for sticking together different technologies such as operating system utilities, databases, and CGI.

  • Perl is easy to use.

Q4:

If I have questions about Perl and CGI , should I post a message to the comp.lang.perl.misc newsgroup or at PerlMonks.org ?

A4:

Probably not. A more appropriate group would be comp.infosystems.www.authoring.cgi . First, though, you should check the FAQ at http://www.w3.org/CGI/.

 <  Day Day Up  >  


SAMS Teach Yourself Perl in 24 Hours
Sams Teach Yourself Perl in 24 Hours (3rd Edition)
ISBN: 0672327937
EAN: 2147483647
Year: 2005
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net