develooper Front page | perl.perl5.porters | Postings from January 2013

[perl #5087] used only once warning

Thread Next
Ricardo SIGNES via RT
January 5, 2013 19:20
[perl #5087] used only once warning
Message ID:
On Fri Dec 14 07:36:17 2012, nicholas wrote:
> On Wed, Dec 12, 2012 at 01:15:39PM -0500, Peter Martini wrote:
> > Right.  Can the ticket be closed for that reason then?  There is an
> > implementation of a module to do this on cpan, and a note on this warning
> > in the docs wouldn't hurt.
> I think fix the documentation to be clear on the "what" and the "why", then
> close the ticket.

When I wrote about this todo a while ago, I suggested that assigning to a lexical was enough 
to indicate that it was used.  For example, "my $exit = Scope::Guard->..." is useful, even if 
you don't mention $exit again.  Similarly, "my ($self, @x) = @_" is not madness.

This does mean that we're detecting fewer actually bogus cases.  We'd only get variables 
declared and use never, rather than used once.  (my $x;)

Is that sufficiently useful to pursue?  I'm not sure.

via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About