develooper Front page | perl.perl5.porters | Postings from August 2003

Re: [perl #23630] problem with "used only once" warning

Thread Previous
From:
H.Merijn Brand
Date:
August 29, 2003 03:36
Subject:
Re: [perl #23630] problem with "used only once" warning
Message ID:
20030829123515.D74E.H.M.BRAND@hccnet.nl
On Fri 29 Aug 2003 11:59, "Orton, Yves" <yves.orton@de.mci.com> wrote:
> +            NOTE: This warning detects symbols that have been used only
> -            once so c, c, c, sub c, c(), &c, *c and c (the filehandle) are
> +            once so $c, @c, %c, *c, &c, sub c{}, c(), and c (the
> filehandle) are
> +            considered the same; if a program uses $c only once but also
> +            uses sub c, it will not trigger this warning.

You forgot one :)))

a5:/tmp 103 > cat >xx.pl
$c = 1;
a5:/tmp 104 > perl -w xx.pl
Name "main::c" used only once: possible typo at xx.pl line 1.
a5:/tmp 105 > cat >>xx.pl
format c =
.
a5:/tmp 106 > perl -w xx.pl
a5:/tmp 107 >

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0, & 5.9.x, and 806 on  HP-UX 10.20 & 11.00, 11i,
   AIX 4.3, SuSE 8.2, and Win2k.           http://www.cmve.net/~merijn/
http://archives.develooper.com/daily-build@perl.org/   perl-qa@perl.org
send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About