in reply to modifying module variables?
Maybe this comes close to what you want without changing too much?
However, as DStaal already suggested, there is probably a better way... described in the tutorials OO-Section...use strict; package MODPERL::SausageGrinder; my $foo = 0; sub printfoo { print "foo is $foo\n"; } sub setfoo { $foo = shift; } package MAIN; MODPERL::SausageGrinder::printfoo; MODPERL::SausageGrinder::setfoo(42); MODPERL::SausageGrinder::printfoo; # prints: # foo is 0 # foo is 42
|
|---|