Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Modules as executable scripts?

by Zaxo (Archbishop)
on Jun 15, 2007 at 02:01 UTC ( #621381=note: print w/replies, xml ) Need Help??


in reply to Modules as executable scripts?

You can test whether Runnable.pm was called from the command line by comparing $0 to __FILE__.

I'm not convinced this is a good idea. I'd prefer to keep my modules distinct from my scripts and to only act like modules. That might save confusion on both the maintainer's and users' parts.

After Compline,
Zaxo

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2021-06-20 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (94 votes). Check out past polls.

    Notices?