in reply to Testing subroutines from a script
If you're running your tests under Test::Harness, it'll set $ENV{HARNESS_ACTIVE} for you. You can then write:
sub main { # everything you'd normally execute here } main() unless ($ENV{HARNESS_ACTIVE});
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Testing subroutines from a script
by mp (Deacon) on Aug 30, 2002 at 19:40 UTC |