Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: testing in perl: main and caller

by water (Deacon)
on Sep 05, 2005 at 02:48 UTC ( [id://489119]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://489119]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found