in reply to Re: apache2 conflicts with strict declaration
in thread apache2 conflicts with strict declaration
seem to do the right thing before 5.8.1? Well, it's very easy. If you do that in Perl's before 5.8.1, strict is not enforced at all in your program!.use strict qw(@ISA);
Observe:
now fails at attempting to use "@ISA" as a keyword. Older versions of Perl, allowed this:$ perl5.8.1 -Mstrict=@ISA -e '$foo = 1' Unknown 'strict' tag(s) '@ISA' at -e line 0 BEGIN failed--compilation aborted.
In other words, the "$foo" not being declared, does not give an error. It should have said:$ perl5.8.0 -Mstrict=@ISA -e '$foo = 1'
$ perl5.8.0 -Mstrict -e '$foo = 1' Global symbol "$foo" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.
So, the statement "that everything works fine" may well be true, as you can make perfectly running programs without using strict. But had the original developer made errors in the naming of variables, you wouldn't have known about it because of the lack stricture actually being applied.
Hope this clears up this little riddle.
Liz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: no strict with 'use strict qw(@ISA)'
by antirice (Priest) on Sep 11, 2003 at 08:17 UTC | |
by liz (Monsignor) on Sep 11, 2003 at 08:28 UTC |