Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: require() turns off strict?

by Anonymous Monk
on Jan 05, 2003 at 07:34 UTC ( [id://224388]=note: print w/replies, xml ) Need Help??


in reply to require() turns off strict?

Given the above responces, I have a question:

Lets say you have 10 .pm files your using in a program and one contains a list of global variables. As an example lets say one of them is $program_name = "foo"; and another is $version = "0.1";

If i wanted to use these through all the modules, AND use strict. How would I go abut doing this?

Replies are listed 'Best First'.
Re: Re: require() turns off strict?
by Matts (Deacon) on Jan 05, 2003 at 11:23 UTC
    Export them using Exporter and "use" the module containing the globals in each module you need those variables in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-17 21:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found