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.
| [reply] [d/l] |
Thanks tye, I actually have tried this and sadly still get the same error.
| [reply] |
require base;
base->import(qw(Admin::Base));
use Data::Dumper;
our @ISA;
warn Dumper \@ISA;
And afer touching Test.pm I see Test.pm ISA Admin::Base:
Wed Feb 17 02:46:35 2010 Test.pm: Subroutine pre_dispatch redefined at Test.pm line 15.
Wed Feb 17 02:46:35 2010 Test.pm: Subroutine save_form redefined at Test.pm line 27.
Wed Feb 17 02:46:35 2010 Test.pm: Subroutine form redefined at Test.pm line 93.
Wed Feb 17 02:46:35 2010 Test.pm: $VAR1 = [
Wed Feb 17 02:46:35 2010 Test.pm: 'Admin::Base'
Wed Feb 17 02:46:35 2010 Test.pm: ];
| [reply] |
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 ?
| [reply] |
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.
| [reply] |