|There's more than one way to do things|
require() turns off strict?by BioHazard (Pilgrim)
|on Jan 04, 2003 at 18:42 UTC||Need Help??|
BioHazard has asked for the
wisdom of the Perl Monks concerning the following question:
Good Evening Monks,
I recently stumbled over a fact that didn't let me stop thinking about it.
I have two Perl scripts, let's say "index.pl" and "engine.pl".
Content of "index.pl":
Content of "engine.pl":
You see that the first line of the second script is actually a comment, because strict is already used in "index.pl".
I tested the use of strict twice. When I uncomment use strict; in "engine.pl", warnings and errors are printed out
(I intentionally did some bad things to test strict). Without use strict; in "engine.pl" the script does run without these warnings.
It seems to me that require() has turned off strict or has done something similar. Should I just go on double-using strict in both files?
Has anyone an idea of the circumstances given?
reading between the lines is my real pleasure.