Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 cooling their heels in the Monastery: (16)
As of 2014-07-10 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (209 votes), past polls