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

what does the test code look like, then?
use_ok('foo.pl');
isn't correct, clearly.

?

Replies are listed 'Best First'.
Re^4: testing in perl: main and caller
by chromatic (Archbishop) on Sep 05, 2005 at 06:14 UTC

    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.