Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 44609
Status: resolved
Priority: 0/
Queue: Perl-Critic-StricterSubs

People
Owner: Nobody in particular
Requestors: APOCAL [...] cpan.org
KENTNL [...] cpan.org
Cc:
AdminCc:

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



Subject: Support for __PACKAGE__
Hello, As usual, thanks for this module and it's handy in my daily development :) However, I noticed this starting to pop up more often after I started to use Moose. Moose recommends me to use "__PACKAGE__->meta->make_immutable" and I'm using it now. The error I see is this: [Modules::RequireExplicitInclusion] Use of "__PACKAGE__" without including "__PACKAGE__" at line 14, column 1. (Severity: 4) Attached is a small patch that fixes this, thanks again for your time! -- ~Apocalypse
Subject: patch.diff
--- RequireExplicitInclusion.pm.orig 2009-03-26 21:38:56.000000000 +0100 +++ RequireExplicitInclusion.pm 2009-03-26 21:36:58.000000000 +0100 @@ -187,6 +187,7 @@ for my $call ( $finder->( $doc ) ) { my $package = $package_extractor->( $call ); next if exists $included_packages->{ $package }; + next if $package eq '__PACKAGE__'; my $desc = qq{Use of "$call" without including "$package"}; push @violations, $self->violation( $desc, $expl, $call );
On Thu Mar 26 16:40:11 2009, APOCAL wrote: Show quoted text
> Hello, > > As usual, thanks for this module and it's handy in my daily
development :) Show quoted text
> > However, I noticed this starting to pop up more often after I started > to use Moose. Moose recommends me to use > "__PACKAGE__->meta->make_immutable" and I'm using it now. > > The error I see is this: > > [Modules::RequireExplicitInclusion] Use of "__PACKAGE__" without > including "__PACKAGE__" at line 14, column 1. (Severity: 4) > > Attached is a small patch that fixes this, thanks again for your time!
Thank you for the patch. We chose to go a different route for the fix, so that we could still flag __PACKAGE__::foo() and $__PACKAGE__::foo as violations (not that they are likely to actually occur in the wild). Our version of the patch has been committed as SVN revision 3981.
Hi, This ticket was changed to patched, but the patch is not yet on cpan. Can I help? On Wed Oct 27 18:19:28 2010, WYANT wrote: Show quoted text
> On Thu Mar 26 16:40:11 2009, APOCAL wrote:
> > Hello, > > > > As usual, thanks for this module and it's handy in my daily
> development :)
> > > > However, I noticed this starting to pop up more often after I started > > to use Moose. Moose recommends me to use > > "__PACKAGE__->meta->make_immutable" and I'm using it now. > > > > The error I see is this: > > > > [Modules::RequireExplicitInclusion] Use of "__PACKAGE__" without > > including "__PACKAGE__" at line 14, column 1. (Severity: 4) > > > > Attached is a small patch that fixes this, thanks again for your time!
> > Thank you for the patch. We chose to go a different route for the fix, > so that we could still flag __PACKAGE__::foo() and $__PACKAGE__::foo as > violations (not that they are likely to actually occur in the wild). > > Our version of the patch has been committed as SVN revision 3981.
Getting a release out that fixes this would be super helpful. I'll echo the offer of help that previous commenters made.
This has finally been released as Perl-Critic-StricterSubs-0.04 https://metacpan.org/release/Perl-Critic-StricterSubs Thanks for your patience.