I ran into a similar problem once. I inherited a script which generated this warning for much the same reason that yours does. I found the offending variable in a line like this:
NO_WARNING( $variable );
And I found an evil line elsewhere that said:
sub NO_WARNING{}
Well, when I went searching for the source of this problem I found out that this had been implemented to avoid the typo warning, but then someone noticed that the constant wasn't being used and deleted it. This left only the sad attempt to silence the warning. Bad, very bad.
My recommendation is to declare constants as subroutines. This not only avoids the warnings but makes the variable immutable.
sub Constant(){2}
Makes
Constant alway return 2. Also, you can place these in a .pm perl module and import them that way so that you don't clutter your namespace.
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.