Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

•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?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (13)
As of 2015-11-30 21:35 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (783 votes), past polls