Fred Moyer wrote:
> Fred Moyer wrote:
>
>> For some reason, while testing with mod_perl1 I get this error message:
>>
>> waiting 60 seconds for server to start: .Syntax error on line 22 of
>> /home/fred/dev/apache-dispatch/trunk/t/conf/extra.last.conf:
>> Can't locate auto/Apache/Dispatch/DispatchReq.al in @INC (@INC contains:
>
>
> Here's the work around I've used so that the DispatchRequire et al.
> method calls can be shared Apache2::Dispatch and Apache::Dispatch. Geoff
> if you have any ideas about why I hit this problem, or how to fix it
> more cleanly please let me know.
this is feeling vaguely familiar. IIRC you _must_ PerlModule the
_exact_ module with your subroutine callbacks. so, if you did something
like this
PerlModule Apache::Dispatch:DispatchReq
it would probably work. but who wants to do that - your solution below
seems perfectly fine.
> This seems like it *might* be a
> mod_perl1 inheritance / command table method name issue - if it looks
> that way to you then I'll put together a reproducible case and send it
> to the mod_perl list.
you could do that, but my feeling is that nobody would touch the mp1
code even to see if it's really a problem that should be addressed or a
"feature" - mp1 is so solid at this point that bugfixes would likely
only be considered if there were no workaround-by-design ability.
oh, and this is you, right?
http://search.cpan.org/~phred/
I need to make you a co-maintainer in pause so you can issue a release
at some point. I'd also make sure to ping thomas again prior to a
release, just to make sure he's ok as the other co-maintainer...
--Geoff
>
> --- trunk/lib/Apache/Dispatch.pm 2006-05-22 01:28:57 UTC (rev 31)
> +++ trunk/lib/Apache/Dispatch.pm 2006-05-22 06:20:02 UTC (rev 32)
> @@ -15,16 +15,38 @@
>
> use mod_perl 1.2401;
> use Apache::Constants qw(OK DECLINED SERVER_ERROR);
> -use Apache::Log ();
> -use Apache::Dispatch::Util;
> -push @Apache::Dispatch::ISA, qw(Apache::Dispatch::Util);
> +use Apache::Log ();
> +use Apache::Dispatch::Util ();
>
> +BEGIN {
> + push @Apache::Dispatch::ISA, qw(Apache::Dispatch::Util);
> +
> + {
> +
> + #---------------------------------------------------------------------
> + # there is a problem with using command_table methods with
> inheritance
> + # so here we map the command table directive names to the
> methods in
> + # Apache::Dispatch::Util using the symbol table. this allows
> us to
> + # share the code between Apache::Dispatch and Apache2::Dispatch
> + #---------------------------------------------------------------------
> +
> + my @dir_names =
> + map { $_->{name} } @{Apache::Dispatch::Util->directives};
> + no strict 'refs';
> + foreach my $directive (@dir_names) {
> + *{"Apache::Dispatch::$directive"} =
> + \&{"Apache::Dispatch::Util::$directive"};
> + }
> +
> + }
> +}
> +
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Apache-dispatch-devel mailing list
> Apa...@li...
> https://lists.sourceforge.net/lists/listinfo/apache-dispatch-devel
|