You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jeremy Howard <je...@optimal-decisions.com> on 2000/04/24 08:18:20 UTC

Re: modperl and MIME::Parser

On Sat, 15 Apr 2000, John S. Evans wrote:

> So digging a little deeper (and through the magic of trial and error), the
> offending module seems to be Mail::Field.
>
> It has a bunch of code to dynamically load perl classes for various types
of
> fields (AddrList, Date, Content-Type, etc), and this code seems to do
> something that makes modperl (or apache) very unhappy.
>
> Basically, it seems to blow through the INC list, looking for a directory
> that matches Mail::Field.  When it finds such a directory, it blows
> recursively through it, using "require" on every file it finds.

In sub import (in Mail::Field), comment out the following lines:

   my($f,$dir,$dir_sep);
   foreach $f (keys %INC)
    {
     if($f =~ /^Mail(\W)Field\W/i)
      {
       $dir_sep = $1;
       $dir = ($INC{$f} =~ /(.*Mail\W+Field)/i)[0] . $dir_sep;
       last;
      }
    }
   _require_dir('Mail::Field', $dir, $dir_sep);

It'll still work fine, but it won't cause the Apache hang.

Or else you can upgrade Apache and mod_perl to the latest versions, which
should fix it.