Alias::const: avoiding `used only once...' warning 
Author Message
 Alias::const: avoiding `used only once...' warning

I've just begun using the Alias module.

Is there some paradigm for avoiding this sort of warning?

  % perl -e 'use Alias qw(const); const PI => 3.14; print $PI, "\n";'
  Identifier "main::PI" used only once: possible typo at -e line 1.

Of course, I will add

  use vars qw($PI);

if necessary.  I was hoping to find a cleaner way.
By a `cleaner way' I mean one where I avoid having to repeat
the names of all const variables in `use vars' stmts.

Texas Instruments, Dallas  TX

Mon, 18 Jan 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Warning Message Incorrectly Says File Handle Variable Used Only Once

2. q: s/const/CONST/o or s/const/CONST/ ?

3. Avoiding Perl warning "uninitialized value"

4. How to avoid warning with method?

5. Setuid Scripts...avoiding warnings

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

7. an alias for multiple 'use's

8. lists direct sendmail aliases for a user/aliasname

9. Using shell aliases from within Perl scripts, question.

10. Using a Unix Alias in Perl

11. avoid using extra variable

12. Using "fork" to avoid crashing script


Powered by phpBB® Forum Software