Spurious "Possible typo" warnings 
Author Message
 Spurious "Possible typo" warnings

I'm a perl newbie.  When I run the following script -w:
        $a=1;
        write STDOUT;
        format STDOUT =

        $a
        .
        format STDOUT_TOP =
        Hi
        .

I get "Possible typo" warnings on _a_ and STDOUT_TOP.
When I add:
        $a .= "";
just below $a=1, the _a_ warning disappears but the STDOUT_TOP
warning remains.

This is minor but irksome.  Is there a way to turn off the STDOUT_TOP
warning?  And is there an easier way to turn off warnings on multiple
variables used only in formats besides explicitly using them elsewhere?

--
Jim Stern -- These views are my own, not my employer's.



Mon, 28 Apr 1997 07:42:50 GMT  
 Spurious "Possible typo" warnings

Quote:
(James M. Stern) writes:

|> I'm a perl newbie.  When I run the following script -w:
|> [It uses $a and format STDOUT_TOP.]
|> I get "Possible typo" warnings on _a_ and STDOUT_TOP.
|> When I add:
|>   $a .= "";
|> just below $a=1, the _a_ warning disappears but the STDOUT_TOP
|> warning remains.  [How to get rid of it?]
It later occurred to me that format STDOUT_TOP and variable $STDOUT_TOP
would probably hash to the same thing.  So I created and used variable
$STDOUT_TOP.  It works.   I'm still looking for a slicker way.  The perl
typo checking is marvelous.  Can it be made even better?
|> --
|> Jim Stern -- These views are my own, not my employer's.

--
Jim Stern -- These views are my own, not my employer's.



Tue, 29 Apr 1997 04:57:07 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Spurious "Ambiguous call resolved as ..." warning

2. possible typo warning

3. URGENT: any typos in "The Book"?

4. "Use of uninitialized value" warnings

5. perl "-w" warning for popup_menu()

6. Avoiding Perl warning "uninitialized value"

7. trapping "severe warnings"?

8. warnings.pm syntax error near "{^"

9. eval warning "Backslash found ..."

10. uninitialized value warning for "truth condition"

11. "odd number of elements" warning with {}

12. avoiding "Use of uninitialized value..." warning

 

 
Powered by phpBB® Forum Software