in reply to RE: (jcwren) Re: sending data between CGI scripts
in thread sending data between CGI scripts
...and so forth. It's a layer of abstraction, to be sure, but if you want to put the whole script into your httpd.conf file, it makes mod_perl'ing it a lot easier.#!/usr/bin/perl -wT use strict; use SuperModule; use CGI; my $q = CGI->new(); # magic here my %actions = ( login => \&do_login, post => \&do_post, pyro => \&set_someone_on_fire ); my $action = $q->param('action'); if (defined $actions{$action}) { $actions{$action}->($q); } else { default_page($q); } sub do_login { # check login parameters here my $q = shift; SuperModule::login($q); # or whatever }
|
|---|