Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Testing Non-module code

by QM (Vicar)
on Mar 16, 2004 at 19:50 UTC ( #337103=note: print w/ replies, xml ) Need Help??

in reply to Testing Non-module code

I saw this on MJD's QOTW. See QOTW #14 Solution and the module. Maybe you can expound on this idea for your needs.

In summary:

Create a module (say YourTestModule), and in the INIT block calls a module sub that runs your tests, then exits (never actually running your program in full).

Run your tests by:

perl -MYourTestModule yourprogram
I'd be interested in comments as to the usefulness of this approach for "serious" code. (Or perhaps there's a better way that hasn't been mentioned yet?)

Quantum Mechanics: The dreams stuff is made of

Comment on Re: Testing Non-module code
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2015-07-01 11:56 GMT
Find Nodes?
    Voting Booth?

    What kind of chocolate gives you the most pleasure?

    Results (815 votes), past polls