Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Site Wide Variables

by akho (Hermit)
on Aug 04, 2007 at 07:28 UTC ( [id://630615]=note: print w/replies, xml ) Need Help??


in reply to Site Wide Variables

I'd make a package with a package variable containing $_mem (then initialize it once and import everywhere).

You may be able to adapt code from Application-wide configuration, actually.

Replies are listed 'Best First'.
Re^2: Site Wide Variables
by Anonymous Monk on Aug 04, 2007 at 07:47 UTC
    how do you import a variable in other areas?

    I think I see one of my problems...

    At the top, my actual $dbh is set in the vars.conf file, and so before I can verify a member I have to call that vars.conf file, yet in that vars.conf file I execute a lot of things, including using some of the $_mem variables, although they are in sub routines, that I don't call until after I set $_mem does that make a difference?

    thank you.

    Junior
      You declare it as our in the package, then use the package elsewhere and use a fully qualified name for the variable (like $My::Package::var).

      Ditn't understand the third paragraph.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-29 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found