We don't bite newbies here... much | |
PerlMonks |
Re: Adding code to a Perl program without stopping itby GrandFather (Saint) |
on Mar 26, 2011 at 08:31 UTC ( [id://895645]=note: print w/replies, xml ) | Need Help?? |
Yes. Specifically it is possible to reload a module. The trick is to update %INC so that a subsequent call to require reloads the module. Consider:
Prints:
Note the use of no warnings 'redefine'; in the module to be reloaded to suppress "Subroutine nextCount redefined at ..." warnings.
True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|