Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Dual personality: Module and script

by TomDLux (Vicar)
on Aug 04, 2004 at 02:30 UTC ( [id://379879]=note: print w/replies, xml ) Need Help??


in reply to Dual personality: Module and script

I too have occassionally hidden test code in my modules, though not as cleanly as BrowserUK

In the fine tradition of TMTOWTDI, note that $0 doesn't change, but __FILE does, as you go from x.pl to x.pm, whether by 'use' or by 'require'.

--
TTTATCGGTCGTTATATAGATGTTTGCA

  • Comment on Re: Dual personality: Module and script

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2024-04-23 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found