in reply to Re: apache2::reload and base.pm
in thread apache2::reload and base.pm

getting same exact behavior... undefined subroutines.

Replies are listed 'Best First'.
Re^3: apache2::reload and base.pm
by Anonymous Monk on Feb 17, 2010 at 05:44 UTC

      The correct caveat for this case is actually a little further down under the "Problems with Scripts Running with Registry Handlers that Cache the Code" heading. In particular, "cached code won't run 'use My::Utils;' again". Similarly, "use base ..." doesn't get run again therefore base::import doesn't initialize @...::ISA again.

      A solution (as mentioned) is to not do such things at compile-time. Instead use, for example:

      require base; base->import( qw< ... > );

      Of course, not having such stuff initialized at compile-time might break code structured in unfortunate ways, so test it.

      - tye        

        Thanks tye, I actually have tried this and sadly still get the same error.
      I've actually read that and tried to mess around with base.pm, but nothing will work... Can I just not use base and expect Apache2::Reload to ever work correctly ?
        um, the problem is most likely with your code. base has some problems that parent cures, but if that doesn't help your situation, then the problem is with your code.