Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 taking refuge in the Monastery: (3)
As of 2014-09-21 07:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (167 votes), past polls