I guess I'm sort of responsible for this. Before 5.8.1, any string following
use strict was allowed. After spending about a day trying to find out why I was still getting redefine warnings in my code, I found out that in fact instead of:
no warnings 'redefine'
I had put
no strict 'redefine'
which somehow made sense in my mind. Except that it didn't silence the redefine warnings. But didn't give me any error either.
I decided to submit a patch to p5p that would warn like this:
$ perl5.8.1 -M-strict=redefine -e 1
Unknown 'strict' tag(s) 'redefine' at -e line 0
and the patch got accepted. Even though 5.8.1 is not out officially, I think the perl that is in RH9.0 is sufficiently like 5.8.1 to have this patch applied.
As to the fact that it works fine in RH7.3. Well maybe, but technically the line was wrong: @ISA got defined as a side effect. Observe:
$ perl5.8.0 -Mstrict -e "@ISA = ()"
Global symbol "@ISA" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.
$ perl5.8.0 -Mstrict=@ISA -e "@ISA = ()"
As to why it got defined originally as a side-effect, I don't know yet. The code in strict.pm is pretty straightforward so there must be som magic going on. I guess I am too tired now to see exactly why it's getting defined. I'll sleep on it and update tomorrow.
Liz
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.