I'm losing variables under apache2:: reload
below is a summation of my problem. when a2::reload recompiles off
of a changed sub, i lose the entire WATCH_ME var.
i think this might happen because of the begin blocks. and the way
plugins register. i thought it wise to bring this up though, see if
there is a way i can keep testing without periodic restarts.
####################
package myapp::tester;
use Data::Dumper();
our %WATCH_ME;
BEGIN {
sub register_plugin {
my ( $package )= @_;
$WATCH_ME= \ ${$package.'::var'};
}
Module::List::Pluggable::import_modules( "myapp::tester" );
}
sub edit_me {
print "After running 1x, delete this line and save";
print Data::Dumper::Dumper(\%WATCH_ME);
};
1;
####################
package myapp::page;
myapp::tester:: edit_me();
1;
####################