On Thu, 21 Oct 2004 17:18:11 -0400, Michael <[EMAIL PROTECTED]> wrote:
> Ok, here's my second go at this... I tried to resolve some of the
> concerns and add some of the features that I got from the first round.
> Thanks to everyone for their input. I think I got everything.

Looks like you've made a little bit of work for yourself with this
module :)  That's what happens when you spark people's imaginations...
 Good work

I've just got a couple of quick comments on the code below:

> package CGI::Application::Plugin::Apache;
> use strict;
> use base 'Exporter';
> use Apache;
> use Apache::Request;
> use Apache::Reload;

You shouldn't be putting Apache::Reload in here.  That should be
placed in a startup script, and should onl;y ever be used in
development.

> use Apache::Constants qw(:common :response);
> use Carp;
> 
> $CGI::Application::Plugin::Apache::VERSION = 0.02;
> 
> use vars qw(@EXPORT_OK %EXPORT_TAGS);
> @EXPORT_OK = qw(handler cgiapp_get_query _send_headers);
> %EXPORT_TAGS = (all => [EMAIL PROTECTED]);
> 
> sub handler ($$) {
>     my ($self, $r) = @_;
>     my $app = $self->new();
>     $app->run();
>     return OK;
> }

That handler sub is not going to be sufficient.  You need to return
REDIRECT if the script generates a Location header.  Looking quickly
at the Apache::Registry code, it just returns $r->status(), which
might do the trick for you.

Once you refine a few more of the features, I think it would be very
worthwhile bringing this up on the mod_perl mailinglist.  I'm sure you
will get many useful suggestions on how to make it work seemlessly
with mod_perl1 and mod_perl2.

Cheers,

-- 
Cees Hek

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to