Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 34713
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Perl-Critic

People
Owner: thaljef [...] cpan.org
Requestors: claco [...] cpan.org
Cc:
AdminCc:

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



Subject: Possible ProtectPrivateSubs False Positive
This is one of those things that are bugs in the eyes of the beholder. ProtectPrivateSubs will list this as a violation: sub { shift->_foo; } while this is fine: sub { my $self = shift; $self->_foo; } On on hand...it's clear from looking at the code that shift is the first @_, and so it's used to call a private sub in the same package. On the other hand, shift could be returning any of the params in @_ depending on what has happened in previous to that shift..so it could be calling a private sub on just about anything. This is a good policy, but in this case, writing my $self = shift just to do $self->_foo is more code than necessary.
Fixed in revision 2592. Look for it in the next release.
Subject: Re: [rt.cpan.org #34713] Possible ProtectPrivateSubs False Positive
Date: Tue, 22 Jul 2008 08:13:14 -0700
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Fix released in v1.090.