![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re: How Do I Bundle Perl Modules and Their Tests Into the Same File?by bmann (Priest) |
on Feb 13, 2006 at 04:38 UTC ( #529740=note: print w/replies, xml ) | Need Help?? |
Try this:
Like python, if the module is used or required test_me will not be executed. If you run the module using perl Module.pm, the code in test_me will be executed. Update: Just realized BrowserUK posted a very similar solution above...
In Section
Seekers of Perl Wisdom
|
|