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

[perl #5087] used only once warning

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
May 18, 2013 00:31
Subject:
[perl #5087] used only once warning
Message ID:
rt-3.6.HEAD-2650-1368837098-1128.5087-15-0@perl.org
On Sat Jan 05 11:20:05 2013, rjbs wrote:
> 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.

This is the sort of ticket where, the more people think out loud about
it, the farther we get from closing it.

My reading of the ticket leads me to believe:

* No one is convinced we need any changes in Perl's behavior here.

* No one is convinced of the necessity of a documentation patch -- as no
one has submitted one since the idea was first floated.

It's time to try, once again, to put this ticket out of its 13-year-old
misery.  I am taking this ticket for the purpose of closing it and will
do so in 7 days unless someone submits a documentation patch.

Thank you very much.
Jim Keenan




---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=5087

Thread Previous | Thread Next


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