-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
used only once warning #3073
Comments
From dha@panix.comMaybe there's a reason for it, but... ~ 12:35:18$ perl -wce '$count = 1;' BUT... ~ 12:35:52$ perl -wce 'my $count = 1;' Shouldn't that warning be raised, regardless of scope? dha Perl Info
|
From @schwern
I agree. In fact the argument for the warning is even stronger for a About the only counter argument I can see is that issuing the warning |
From @gannett-ggreerOn Sat Jul 23 01:55:34 2005, schwern wrote:
There's a CPAN module for that: Requests to make this a core feature please make a separate ticket. -- |
@gannett-ggreer - Status changed from 'open' to 'resolved' |
From @nwc10On Wed Jul 28 18:43:18 2010, greerga wrote:
It would be inappropriate to put that module as implemented in the core. /* Since these APIs are not public, the definitions are a little #if PERL_BCDVERSION >= 0x5010000 The clean correct way to do this in core would be to add code into pad Nicholas Clark |
@rjbs - Status changed from 'resolved' to 'open' |
From PeterCMartini@GMail.comSo, I wrote a patch to do this, but I can't submit that patch as is Virtually all of the warnings I've seen are due to this style of code: sub { Which I suspect exists often enough in the wild that a lot of Although, code in evals (which includes use and require) doesn't trigger |
From [Unknown Contact. See original ticket]So, I wrote a patch to do this, but I can't submit that patch as is Virtually all of the warnings I've seen are due to this style of code: sub { Which I suspect exists often enough in the wild that a lot of Although, code in evals (which includes use and require) doesn't trigger |
From @iabynOn Mon, Dec 10, 2012 at 10:12:54AM -0800, Peter Martini via RT wrote:
Which is probably a good reason not to add such a warning. -- |
From PeterCMartini@GMail.comOn Dec 12, 2012 11:03 AM, "Dave Mitchell" <davem@iabyn.com> wrote:
Right. Can the ticket be closed for that reason then? There is an
|
From @nwc10On Wed, Dec 12, 2012 at 01:15:39PM -0500, Peter Martini wrote:
I think fix the documentation to be clear on the "what" and the "why", then Nicholas Clark |
From @rjbsOn Fri Dec 14 07:36:17 2012, nicholas wrote:
When I wrote about this todo a while ago, I suggested that assigning to a lexical was enough This does mean that we're detecting fewer actually bogus cases. We'd only get variables Is that sufficiently useful to pursue? I'm not sure. |
From @jkeenanOn Sat Jan 05 11:20:05 2013, rjbs wrote:
This is the sort of ticket where, the more people think out loud about 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 It's time to try, once again, to put this ticket out of its 13-year-old Thank you very much. |
From @nwc10On Fri, May 17, 2013 at 05:31:39PM -0700, James E Keenan via RT wrote:
I don't agree with this reasoning. Specifically treating "necessity" as By that reasoning, we would close all wishlist tickets that no-one works on.
I don't agree with this. The documentation doesn't say clearly that it doesn't apply to lexicals. A documentation patch is desirable. But anyone could write it. But not I would welcome a documentation patch that said that the warning doesn't Nicholas Clark |
From @ap* Ricardo SIGNES via RT <perlbug-followup@perl.org> [2013-01-05 20:25]:
I feel it would be. But at that point we are also talking about wholly different concepts: So if something is to be implemented for lexicals then it really ought |
From @AbigailOn Sat, 05 Jan 2013 11:20:05 -0800, rjbs wrote:
But declaring variables, and never using them can still be very useful. This is how I write new() in my objects: sub new ($class) { Here $var is declared, but never used. Unless you count "taking the Abigail |
From @xsawyerxOn 01/19/2018 11:24 PM, Abigail via RT wrote:
Out of curiosity, what's the benefit of this? |
From @AbigailOn Sat, Jan 20, 2018 at 09:29:42PM +0100, Sawyer X wrote:
Because all I need of an object is its memory address. "Data inheritance Hence, I don't do that. Instead, I store the objects attributes in lexical Abigail |
Migrated from rt.perl.org#5087 (status was 'open')
Searchable as RT5087$
The text was updated successfully, but these errors were encountered: