Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Can I force strictness on included files?

by monkfan (Curate)
on Jun 30, 2005 at 08:09 UTC ( #471249=note: print w/replies, xml ) Need Help??


in reply to Can I force strictness on included files?

I'm not quite sure what do you mean by that.
From what I understand I guess you just need to include 'use strict' in the file you wish to call. Like this:
use strict; #File name: mydata.pl my $res = {# reference variable value..etc};
Then call it with:
my $another_var = do 'mydata.pl';
Please see tlm's answer to my posting in the same breath with your question.
Regards,
Edward

Replies are listed 'Best First'.
Re^2: Can I force strictness on included files?
by Thilosophy (Curate) on Jun 30, 2005 at 08:42 UTC
    From what I understand I guess you just need to include 'use strict' in the file you wish to call.

    Sure, but I want to avoid having to do this.

    I like to update things in only one place, so instead of specifying use strict; in my about one hundred data files (I think I am actually in a similar situation than you describe), I would rather do that in the one place where all these other files are included in the main module.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2021-04-14 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?