Do you know where your variables are? | |
PerlMonks |
Re: Triggering 'strict' from within a packageby Joost (Canon) |
on Aug 12, 2002 at 14:59 UTC ( [id://189518]=note: print w/replies, xml ) | Need Help?? |
I rolled my own importer which automatically places the modules in main:: Ah, you mean the package main; importer code :-) Anyway, strict is a lexical pragma, so you cannot set at it for other files. I assume this was done to keep non-strict code working together with strict code. this is also one of the reasons you have to use strict; for every module you use instead of defining it in the top-level code. Update: I cannot think of any reason to turn off strict based on the location of the script, so I would suggest keeping it on where it makes sense.
Hope this explains a bit,
In Section
Seekers of Perl Wisdom
|
|