|
|
 |
|
|
| | |
|
|
Finding CGI Scripts
|
|
Date Published: 2002-08-28
No matter how much we try to persuade people that Perl is a multi-purpose programming language, we'd be deluding ourselves if we didn't admit that the majority of programmers first come into contact with Perl through their experience of CGI programs. People have a small web site and one day they decide that they need a guest book, a form mail script or a hit counter. Because these people aren't programmers, they go out onto the web to see what pre-written scripts they can find.
And there are plenty to choose from. Try searching on ``CGI scripts'' at Google. I found about two million hits. The first two were those well-known sites - Matt's Script Archive and the CGI Resource Index. Our web site owner will visit one of these sites, find the required scripts and install them on his web site. What could be simpler? See, the web is as easy as people make it out to be.
In this article, I'll take a closer look at this scenario and show that all is not as rosy as I've portrayed it above.
Click here to read more...
|
| (Added: Wed Aug 28 2002 Hits: 58 Rating: 0.00 Votes: 0)
|
|
|
|
Why use CGI.pm
|
|
Date Published: 2002-08-27
One of Perl's greatest strengths is the CPAN, an archive
of programs, scripts, snippets, and modules. These are all made available to
other programmers worldwide, usually under the same terms as Perl itself. Just
about anything that can be done with Perl is on the CPAN, or will be there
shortly. (Some writers even find inspiration for columns and articles by
watching the list of recent uploads.)
Because of (or contributing to) Perl's popularity as a language for web
development and CGI programming, several CPAN modules handle everything from
HTML formatting to CGI parameter processing. The grande dame is CGI.pm.
Written by Lincoln Stein, it has the potential to make your CGI scripts
shorter, more secure, more valid, and much easier to write. Even better, the
CGI module has shipped in the core Perl distribution for several years. Any
web host worth using will have it installed.
Unfortunately, many coders are not aware of the module's existence. Others
don't see the need, as it's possible to write CGI programs in Perl without
CGI.pm. Doing so, however, is similar to reading webpages through telnet
instead of using a web browser. This may be a good learning experience, but
it's fragile and very difficult to debug.
Two widely-used ``alternatives'' exist. One is cgi-lib.pl, an ancient Perl 4
libary. The other is a copied and pasted snippet of code that originated
either in a web programming book or a free script. Both date back to the
origins of the original CGI standard. While there are good alternatives to
CGI.pm, these two solutions do not apply. They appear simple and effective,
especially if they're familiar, but subtle and unsubtle bugs lurk underneath.
Except in very specific cases, all new CGI programs written in Perl should use
CGI.pm. This article explains three areas in which the module is superior to
the other two common approaches.
Click here to read more...
|
| (Added: Tue Aug 27 2002 Hits: 62 Rating: 0.00 Votes: 0)
|
|
|
|
Web Development with Apache and Perl
|
|
Date Published: 2002-08-26
In this chapter we'll discuss the different aspects of the web server, by which we mean both the physical machine and the program that responds to clients. It may seem somewhat confusing to mean two or more different things at different times, but the usage is normal in the industry. Context should make it clear when we mean hardware or software.
Click here to read more...
|
| (Added: Mon Aug 26 2002 Hits: 75 Rating: 0.00 Votes: 0)
|
|
|
|
Autovivification : What is it and why do I care?
|
|
Date Published: 2001-02-16
During the growth curve of every Perl hacker they come to managing
complex data structures like hash of hashes and lists of lists, etc. They
usually get the hang of it with help from
perllol,
perldsc, some good
books, usenet, #perl and whatever other resources they can find. But one
subtle Perl feature seems to trip many of them up and that is the
subject of this tutorial.
Click here to read more...
|
| (Added: Fri Feb 16 2001 Hits: 65 Rating: 0.00 Votes: 0)
|
|
|
|
yapc 19101
|
|
Date Published: 2000-07-01
A mere 2 weeks after returning from Perl Whirl 2000, I made a last-minute
conference decision and was off again to yapc 19100 (Yet Another Perl Conference).
Click here to read more...
|
| (Added: Sat Jul 01 2000 Hits: 73 Rating: 0.00 Votes: 0)
|
|
|
|
|
Pages: [<<] 1 2 3 4 5 6 [>>] |
| |
|
| |