Skip Menu |

This queue is for tickets about the warnings-unused CPAN distribution.

Report information
The Basics
Id: 41639
Status: resolved
Priority: 0/
Queue: warnings-unused

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: warning about used variable in certain nest and shadow
Date: Fri, 12 Dec 2008 08:05:41 +1100
To: bug-warnings-unused [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With warnings::unused 0.021 and the debian perl 5.10.0 the program below prints Unused variable my @x at foo.pl line 6. whereas I believe that variable is in fact used. For what it's worth it seems to be related to having another @x in the sub-block and then the only uses of the toplevel @x being within a further, separate, subblock at the same nesting level.
package main; use strict; use warnings; use warnings::unused; my @x; { my @x = ("one\n"); print $x[0]; } { $x[0] = "two\n"; print $x[0]; }
Fixed in 0.03. -- Goro Fuji (gfx) GFUJI at CPAN.org