Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://159196]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-06-27 18:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (611 votes). Check out past polls.