in reply to Re: Setting up mod_perl handlers
in thread Setting up mod_perl handlers

You can still use the path_info() information and not use the query string at all.

F.ex. I have an archive for the Sybperl-l mailing list here. The mod_perl handler looks like this:

<Location /archive> SetHandler perl-script PerlHandler My::Archive </Location>
However, the "My::Archive" module understands things like: http://www.peppler.org/archive/sybperl-l/2003/11/7567.html by doing the following:
sub handler { my $r = shift; my $path = $r->path_info(); my $q = Apache::Request->new($r); my $dbh = getDataBaseHandle(); $path =~ s/\.html$//; my ($junk, $list, $year, $mon, $msg) = split(/\//, $path); if(!$year) { displayYears($q, $dbh, $list); } elsif(!$mon) { displayMonths($q, $dbh, $list, $year); } elsif(!$msg) { displayMsgs($q, $dbh, $list, $year, $mon); } else { displayMessage($q, $dbh, $list, $year, $mon, $msg); } }
... and yes, the mail archive is stored in a Sybase database.

Michael

Replies are listed 'Best First'.
Re: Re: Re: Setting up mod_perl handlers
by Anonymous Monk on Nov 21, 2003 at 15:49 UTC
    The programmers POV is unimportant