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

Re: Require Centralized Variables

by axelrose (Scribe)
on Dec 05, 2002 at 09:47 UTC ( [id://217715]=note: print w/replies, xml ) Need Help??


in reply to Require Centralized Variables

Another possible solution I prefer is to avoid having variables in the required script
# main script require "conf.pl"; my $conf = get_conf(); print $conf->{foo}; ... # conf.pl sub get_conf { { foo => "bar", color => "red" } } 1;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-25 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found