in reply to Re: testing in perl: main and caller
in thread testing in perl: main and caller

That's basically what the book suggests. Thanks!

Replies are listed 'Best First'.
Re^3: testing in perl: main and caller
by water (Deacon) on Sep 05, 2005 at 02:48 UTC
    what does the test code look like, then?
    use_ok('foo.pl');
    isn't correct, clearly.

    ?

      The book has:

      ok( require( 'foo.pl' ), 'loaded file successfully' ) or exit;

      I think require_ok() would also work, though I'm not in a position to try it right now, nor do I remember if I wrote it as above for a specific reason.