You can have it both ways. See brian d foy's article 'How a script becomes a module'. Make it a module for testing purposes and a script otherwise.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re^3: Thorny design problem
by xdg
in thread Thorny design problem
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |