Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: How a script becomes a module

by bsb (Priest)
on May 09, 2006 at 07:35 UTC ( #548154=note: print w/ replies, xml ) Need Help??

in reply to How a script becomes a module

I've been using this technique and found it helpful for testing, among other things. Today I hit a snag while packaging my code with PAR. After a bit of debugging I discovered that packaged files don't have an empty caller so to make PAR friendly modulinos use something like:

__PACKAGE__->run() if !caller() || caller() eq 'PAR';

Comment on Re: How a script becomes a module
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-10-06 23:27 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (164 votes), past polls