in reply to How to make a module aware it is being tested?
Sprinkle if (exists $INC{'Test/More.pm'}) (or whatever test module you are using) tests through your code as required.
That doesn't tell you if the code was actually called in a test context, but it does tell you if the test environment is loaded.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to make a module aware it is being tested?
by Roy Johnson (Monsignor) on Nov 01, 2007 at 22:34 UTC |