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

•Re: Source files, packages and name spaces

by merlyn (Sage)
on Apr 15, 2002 at 14:07 UTC ( #159196=note: print w/ replies, xml ) Need Help??


in reply to Source files, packages and name spaces

My standard idiom for including multiple packages in the same file is:

BEGIN { package My::Package; ... code goes here ... }
That way, it acts like a use, causing all "regional" definitions and actions to be executed before the "main" program starts running.

-- Randal L. Schwartz, Perl hacker


Comment on •Re: Source files, packages and name spaces
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-12-20 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (96 votes), past polls