Hi Stas,

Am Donnerstag, 19. Februar 2004 11:03 schrieb Stas Bekman:
> Boris Zentner wrote:
> [...]
>
> >>i.e. I can't reproduce your problem. Are you sure you are using the
> >> latest cvs, did you run 'make install'?. There were quite a few changes
> >> in the APR::Pool code over the last month.
> >
> > Yes, Im sure. But for some reason It did not crash for me too. I
> > investigate.
>
> that's a good news (for me, hopefully no guessing will be needed). Now you
> need to figure out how to make it crash, and hopefully it'll crash for me
> too ;)

It was easy, install this EazyLife too.

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;


-- 
Boris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to