I too have occassionally hidden test code in my modules, though not as cleanly as BrowserUK
In the fine tradition of TMTOWTDI, note that $0 doesn't change, but __FILE does, as you go from x.pl to x.pm, whether by 'use' or by 'require'.
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Re: Dual personality: Module and script
by TomDLux
in thread Dual personality: Module and script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |