develooper Front page | perl.perl5.porters | Postings from December 2012

Re: [perl #5087] used only once warning

Thread Previous | Thread Next
From:
Peter Martini
Date:
December 12, 2012 18:15
Subject:
Re: [perl #5087] used only once warning
Message ID:
CAFyW6MSKHQG9mePq6qHJ_=oX0e7NTu6Y0jyRSAgLBT_p+xNC_g@mail.gmail.com
On Dec 12, 2012 11:03 AM, "Dave Mitchell" <davem@iabyn.com> wrote:
>
> On Mon, Dec 10, 2012 at 10:12:54AM -0800, Peter Martini via RT wrote:
> > So, I wrote a patch to do this, but I can't submit that patch as is
> > because there's quite a few tests that fail (the tests check to make
> > sure no warnings are triggered, and now they capture the used once
warning).
> >
> > Virtually all of the warnings I've seen are due to this style of code:
> >
> > sub {
> > my ($self, @args) = @_;
> > do_something @args;
> > }
> >
> > Which I suspect exists often enough in the wild that a lot of
> > scripts/modules would see new warnings if this is enabled ...
>
> Which is probably a good reason not to add such a warning.

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 thought I was wrong once, but I was mistaken.

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