water has asked for the wisdom of the Perl Monks concerning the following question:
chromatic's & ian langworth's most excellent book on perl testing had a tip on how to use caller and a subroutine do_main so that a perl script ("perl foo.pl") could also be loaded in a test script (eq 'use'd or 'require'd) w/o executing, so its subs could be tested.
sadly i lent the book away and won't have access to it for a while.
could someone assist with that idiom?
thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: testing in perl: main and caller
by bmann (Priest) on Sep 05, 2005 at 02:14 UTC | |
by chromatic (Archbishop) on Sep 05, 2005 at 02:37 UTC | |
by water (Deacon) on Sep 05, 2005 at 02:48 UTC | |
by chromatic (Archbishop) on Sep 05, 2005 at 06:14 UTC | |
|
Re: testing in perl: main and caller
by xdg (Monsignor) on Sep 06, 2005 at 11:40 UTC |