Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Require Centralized Variables

by axelrose (Scribe)
on Dec 05, 2002 at 09:47 UTC ( #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
Node Status?
node history
Node Type: note [id://217715]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2020-04-10 10:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (49 votes). Check out past polls.

    Notices?