You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
868 B
21 lines
868 B
5 years ago
|
This is a workaround for https://github.com/Perl-Critic/Perl-Critic/issues/911
|
||
|
|
||
|
This workaround causes no change in behaviour, but a long-term fix may include
|
||
|
making "isa" a special case like import, AUTOLOAD, and DESTROY, which are
|
||
|
commonly overridden. That would be a behaviour change.
|
||
|
|
||
|
The "## no critic" pragma wouldn't be needed prior to Perl 5.32, hence the
|
||
|
additional reference to Miscellanea::ProhibitUselessNoCritic.
|
||
|
|
||
|
--- lib/Perl/Critic/Document.pm
|
||
|
+++ lib/Perl/Critic/Document.pm
|
||
|
@@ -137,7 +137,7 @@ sub ppi_document {
|
||
|
|
||
|
#-----------------------------------------------------------------------------
|
||
|
|
||
|
-sub isa {
|
||
|
+sub isa { ## no critic (Subroutines::ProhibitBuiltinHomonyms, Miscellanea::ProhibitUselessNoCritic)
|
||
|
my ($self, @args) = @_;
|
||
|
return $self->SUPER::isa(@args)
|
||
|
|| ( (ref $self) && $self->{_doc} && $self->{_doc}->isa(@args) );
|