Embedding a Perl interpretter into Apache allows one to harness a lot of power!
By building on component systems, CPAN libraries and the Apache API, we
clearly benefit from an expanded breadth of possibilities using mod_perl.
For instance, to log into our publishing system, you must access the SSL
virtual host. It's running the Apache::AuthDBI module to look up users
in the database. We have our own PerlHandler that issues a cookie
with connection characteristics hashed against a secret key. A
PerlAccessHandler then verifies that user is permitted by checking the cookie
values against the hashed data. Username and passwords never cross the
wire in the clear thus users can access the publishing system across the
public networks reasonably assured of security.
Session data is maintained with Apache::Session to prevent repeated SQL lookups
as users access the system. Once we know who the user is, we can populate
their session with some of their personal infoirmation, their group
memberships and other vital data that we don't want to have to fetch from the
database for every request.
Of course there's also a Logout handler to ditch the session and login cookies.
All of this is accomplished with fairly simple code on top of CPAN modules and
the Apache API.