Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-05-18 17:01 GMT
Find Nodes?
    Voting Booth?

    No recent polls found