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: 68086
Status: open
Priority: 0/
Queue: Perl-Critic

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

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



Subject: BEGIN { @ISA } detected as "run-time"
Download (untitled) / with headers
text/plain 493b
The following was provided to me from a "security report" which uses Perl Critic. inc/Module/Install/AutoInstall.pm ,9, ClassHierarchies::ProhibitExplicitISA , bug , low , @ISA used instead of "use base" , Do not signify inheritence at runtime , perlcritic , See page 360 of PBP ,3 The line in question is BEGIN { @ISA } This is considered "run-time" usage of @ISA, which is incorrect. The ProhibitExplicitISA should not emit run-time errors when the usage of ISA is not at run-time.
Subject: Re: [rt.cpan.org #68086] BEGIN { @ISA } detected as "run-time"
Date: Tue, 10 May 2011 18:35:22 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Download (untitled) / with headers
text/plain 167b
I'd say that the Policy's description is in error, not the code. @ISA shouldn't be explicitly referenced, regardless of whether it's during the compile or run phase.
Subject: Re: [rt.cpan.org #68086] BEGIN { @ISA } detected as "run-time"
Date: Tue, 10 May 2011 23:46:46 -0700
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeff [...] imaginative-software.com>
Download (untitled) / with headers
text/plain 700b
I'm not sure where the phrase "Do not signify inheritence at runtime" came from. That isn't part of the Policy description now, and I don't think it ever has been. Perhaps that was added by the "security report." But as Elliot pointed out, the intent of the Policy is to forbid meddling with @INC directly, regardless of whether it is run-time or compile-time. If you really need/want to do something clever with @ISA, then you are on your own. Although the line of code you cited seems pretty useless and could probably be removed (unless there is more that you haven't shown us). Jeffrey Thalhammer Imaginative Software Systems vcard: http://www.imaginative-software.com/contact/jeff.vcf


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.