Subject: | Perl::Critic::Policy::Bangs::ProhibitRefProtoOrProto breakage |
Date: | Sat, 30 Dec 2006 17:03:09 -0500 (EST) |
To: | bug-Perl-Critic-Bangs [...] rt.cpan.org |
From: | "Justin DeVuyst" <justin [...] devuyst.com> |
Seems this module breaks when using ref() in some situations.
In particular, something like this:
my @those;
my @these = grep { ref } @those;
will cause this to happen:
Can't call method "isa" without a package or object reference at
/Library/Perl/5.8.6/Perl/Critic/Policy/Bangs/ProhibitRefProtoOrProto.pm
line 29.
I fixed it locally for now by just inserting a
return unless $suspectproto;
at line 29 (right before the offending isa() call).
Thanks,
jdv