Perl for CGI and Web Programming
Perl 5 was one of the first available technologies for automating a web-server, and is still considered one of the most powerful and most cost-effective ones, today. Once you learn the core language, and some HTML and HTTP concepts, programming a simple CGI callback or form handler is very easy and straightforward.
Users are recommended to start by first reading the HTML Dog tutorials for learning XHTML and CSS (without coverage of Perl) and then Ovid's CGI Course. The other links here may also prove useful.
Tutorials
HTML Dog HTML & CSS Tutorials
Recommended best practice tutorials for getting up-to-speed with XHTML and CSS, teaching valid code and good practices.
Ovid's CGI Course
A free CGI Course by Curtis Poe (Ovid) for people who already know a little Perl and a little HTML.
Our own CGI Getting Started
In the Wiki.
Interfaces
Plack/PSGI
PSGI is an interface between Perl web applications and web servers, and Plack is a Perl module and toolkit that contains PSGI middleware, helpers and adapters to web servers.
Using Plack and PSGI is more recommended than using the old CGI.pm interface.
Web Frameworks
Mojolicious and Mojolicious::Lite
Self-contained web-development frameworks for Perl 5. “Mojolicious” is similar in scope to Catalyst, while “Mojolicious::Lite” is a micro-web-development framework, similar to Dancer.
Being self-contained (The Web in a box
), Mojolicious re-invents many CPAN wheels (possibly better, but still different), which may be a good or a bad thing.
Mojolicious established itself as the most popular Perl web-development framework.
Dancer
A micro web development framework for Perl that is succinct and flexible and allows writing small or quick-and-dirty web applications with ease. It started as a Perl port of the Ruby micro-framework Sinatra.
It is probably better (in 2024-07-23) to use Mojolicious and Mojolicious::Lite.
Catalyst
A flexible web framework for Perl, with many useful modules for it on CPAN, that provide interfaces to many other modules. After learning it, one can build web applications with ease.
CGI::Application
CGI::Application is an older attempt at a web development framework for Perl, but is likely no longer recommended and is showing its age. If you're interested in developing web applications quickly, you should look at Mojolicious and Mojolicious::Lite instead.
Frameworks as Preprocessors
HTML::Mason
A portable solution for a dynamic maintenance of a Perl site. Very powerful and feature-rich. Also cross-platform.
Apache::ASP
An implementation of the Active Server Pages for Perl on UNIXes. Compatible with the Perl ASP on Microsoft's IIS server, and so provides a cross-platform solution.