On Sat, 29 May 2004, Stas Bekman wrote:

> Date: Sat, 29 May 2004 12:50:46 -0700
> From: Stas Bekman <[EMAIL PROTECTED]>
> To: Jie Gao <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [mp2] 1.99_14: socket problem
>
> Jie Gao wrote:
> [...]
> > I find I get this kind of error message with almost all accesses.
> >
> > I get this when accessing server-status:
> >
> > [Sat May 29 21:41:07 2004] [error] [client 129.xxx.xxx.100] Undefined subroutine 
> > main:: called at -e line
> > 0\n\tApache::porting::__ANON__('Apache::RequestRec=SCALAR(0x83b32c)') called at -e 
> > line 0\n\teval {...} called at
> > -e line 0\n
> > [Sat May 29 21:41:07 2004] [error] [client 129.xxx.xxx.100] Undefined subroutine 
> > main:: called at -e line
> > 0\n\tApache::porting::__ANON__('Apache::RequestRec=SCALAR(0x83b32c)') called at -e 
> > line 0\n\teval {...} called at
> > -e line 0\n
> > [Sat May 29 21:41:07 2004] [error] [client 129.xxx.xxx.100] Undefined subroutine 
> > main:: called at -e line
> > 0\n\tApache::porting::__ANON__('Apache::RequestRec=SCALAR(0x83b32c)') called at -e 
> > line 0\n\teval {...} called at
> > -e line 0\n
> >
> > and this while accessing perl-status:
> >
> > [Sat May 29 21:42:23 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine 
> > main::129.xxx.xxx.xxx called at
> > -e
> > line 0\n, referer: http://wasm-test.auth.usyd.edu.au/perl-status?inc
> > [Sat May 29 21:42:30 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine 
> > main::gzip,deflate called at -e
> > line 0\n, referer: http://wasm-test.auth.usyd.edu.au/perl-status?inc
> > [Sat May 29 21:42:35 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine 
> > main::129.xxx.xxx.xxxxx called
> > at -e
> > line 0\n, referer: http://wasm-test.auth.usyd.edu.au/perl-status?inc
> >
> > [Sat May 29 21:42:56 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine 
> > main::129.xxx.xxx.21 called at
> > -e
> > line 0\n
> > [Sat May 29 21:43:00 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine
> > main::text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,image/gif;q=
> > 0.2,*/*;q=0.1 called at -e line 0\n
> > [Sat May 29 21:43:08 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine 
> > main::129.xxx.xxx.xxx called at
> > -e
> > line 0\n
> >
> > Looks definitely like %ENV problem, although it only shows in the error_log.
>
> Most likely it's a problem with UNIVERSAL::AUTOLOAD. Using the $SIG{__DIE__}
> trick you should be able to see who called those non-existing functions.
>
> I think you are using mp2 enough time to start porting the applications for
> real, and drop any helper tools which aren't perfect. As the Apache::porting
> manpage mentions we have discussed and worked on developing a better AUTOLOAD
> technique (which doesn't use UNIVERSAL), but even that one wasn't perfect. If
> you are interested to try it, search the archives for EazyLife:

All my applications are mp2 native. I was just putting in Apache::porting
to see what it does.

> http://marc.theaimsgroup.com/?l=apache-modperl-dev&w=2&r=1&s=eazylife&q=b
>
> I think the latest version was:
>
> package ModPerl::EazyLife;
>
> use ModPerl::MethodLookup ();
> use Carp;
>
> my @avail_modules = ModPerl::MethodLookup::avail_modules();
> push @avail_modules, 'Apache'; # XXX: may go away
> my $skip = qr|(::)?DESTROY$|;
> for my $module (@avail_modules) {
>      *{"$module\::AUTOLOAD"} = sub {
>          my($hint, @modules) =
>              ModPerl::MethodLookup::lookup_method($AUTOLOAD, @_);
>
>          # there should be only one match
>          if (my($module) = @modules) {
>              eval "require $module";
>              # use the function from the module that we have just loaded
>              $AUTOLOAD =~ s/.*::/${module}::/;
>              goto &$AUTOLOAD;
>          }
>          else {
>              return if $AUTOLOAD =~ /$skip/;
>              croak $hint || "Can't find $AUTOLOAD";
>          }
>      };
> }
>
> 1;

$AUTOLOAD needs to be pre-defined here, I find.

Running this, I got error:

No 'method' argument was passed
 at /usr/local/perl-5.8.4/lib/site_perl/5.8.4/sun4-solaris/ModPerl/RegistryCooker.pm 
line 202

Regards,



Jie

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to