in reply to Re^5: Need advice on test output
in thread Need advice on test output
To achieve the perfect test harness, 1) supply a patch to Smart::Comments that allows it to be enabled/disabled via an environment variable, (with the default being OFF). [...]
Don't need a patch for this item. You can use if to achieve this.
use if $ENV{USE_SMART_COMMENTS}, 'Smart::Comments';
Also, you could omit the use Smart::Comments and do -M.
perl -MSmart::Comments script.pl
However, the effect is shallow when using -M. Only the file loaded directly is affected. To test a module, you'd have to execute it as a script.
perl -MSmart::Comments Module.pm
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Need advice on test output
by BrowserUk (Patriarch) on Jan 06, 2007 at 08:07 UTC |