On Mon, 3 Apr 2000, Drew Taylor wrote:
> In light of the recent "performance monger" thread, I am interested in
> information about transitioning from Registry scripts to Apache
> handlers. Here is my situation, which I'm guessing is pretty common.
[...]
> use Search;
> use CGI;
> my $q = new CGI;
> my $action = $q->param('A');
> my $object = Search->($CGI);
> if ($action eq 'R') {
> $object->searchResults;
> } elsif ($action eq 'S') {
> $object->Search;
> }
That should be pretty easy to convert, since you already have your main
program logic off in a separate module.
> Should I just use Apache::Request instead of CGI.pm? (I do use the
> cookie & checkbox/pulldown functionality often).
Use Apache::Request and Apache::Cookie (both in the libapreq
distribution). I don't use the sticky forms stuff in CGI.pm, so I don't
know if there's a handy replacement. Check CPAN or just roll your own.
Maybe you could make a subclass of Apache::Request that adds somemethods
for this.
> If there are any tutorials out there, I'd love some links.
It really isn't difficult enough to merit a tutorial, in my opinion. It's
just ordinary perl module stuff.
- Perrin