There is one trick that I sometimes use....
It is possible for your module to know if it was "used" versus executed directly. This allows me to put a test driver in the module itself that I use during development that presents more info that just a "pass/fail". If you do this, you will want your .pm to be an executable file under Unix.
#Normal module preamble here... sub test{ print "this is a dev test...\n"; } test() if not caller; ### Run test() if run directly #Normal rest of module code here.... 1;
In reply to Re^3: Writing my first module
by Marshall
in thread Writing my first module
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |