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

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 1.109
  • 1.111
Fixed in:
  • 1.110_001
  • 1.112_001
  • 1.112_002
  • 1.113



Subject: OptionsProcessor vs perl 5.8.3 Exporter
Date: Sun, 05 Sep 2010 08:35:26 +1000
To: bug-Perl-Critic [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With perl 5.8.3 Perl::Critic::OptionsProcessor in the cvs bombs with ":color_severity" is not exported by the Perl::Critic::Utils::Constants module Apparently Exporter.pm 5.57 demands that a :foo tag is first on the import line. Switching to :color_severity first works,
Index: OptionsProcessor.pm =================================================================== --- OptionsProcessor.pm (revision 3918) +++ OptionsProcessor.pm (working copy) @@ -19,8 +19,8 @@ :booleans :characters :severities :data_conversion $DEFAULT_VERBOSITY >; use Perl::Critic::Utils::Constants qw< + :color_severity # crib: tags first for Exporter 5.57 in perl 5.8.3 $PROFILE_STRICTNESS_DEFAULT - :color_severity >; use Perl::Critic::Utils::DataConversion qw< dor >;
Subject: Re: [rt.cpan.org #61071] OptionsProcessor vs perl 5.8.3 Exporter
Date: Sat, 04 Sep 2010 19:36:05 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
On 9/4/10 5:36 PM, Kevin Ryde via RT wrote: Show quoted text
> Apparently Exporter.pm 5.57 demands that a :foo tag is first on the > import line. Switching to :color_severity first works,
That doesn't make any sense. Those lines last changed in January and we've got passes on 5.8.3: http://www.cpantesters.org/cpan/report/07676213-b19f-3f77-b713-d32bba55d77f
On Sat Sep 04 20:36:18 2010, clonezone wrote: Show quoted text
> On 9/4/10 5:36 PM, Kevin Ryde via RT wrote:
> > Apparently Exporter.pm 5.57 demands that a :foo tag is first on the > > import line. Switching to :color_severity first works,
> > That doesn't make any sense. Those lines last changed in January and > we've got passes on 5.8.3: > http://www.cpantesters.org/cpan/report/07676213-b19f-3f77-b713- > d32bba55d77f
This is exactly the problem reported by CPAN testers in one of my modules under Perl 5.6, and I duplicate it for Perl::Critic under my semi-broken 5.6.2. It's going to be hard to investigate, because Exporter did not become dual-life until 5.59 -- before that it was core only. Yes, we have a pass under 5.8.3, but the report says Exporter 5.63 is installed, not 5.57. I'd love to look at the Perl 5.6 passes reported in the matrix, but I can't figure out how to get to them. Anyhow, I read this as probably a real problem related to the version of Exporter installed. The question is what to do about it. Do we juggle the import tags? Or do we require a minimum version of Exporter, and if so, which? CP5.6.2AN appears to have 5.63, if I got my CPAN configured correctly and flushed all the caches. Certainly the CPAN testers matrix has passes for 5.63 under 5.6.1 and 5.6.2. There are no reports for 5.6.0.
For what it's worth, I have duplicated the problem under Perl 5.8.3 with Exporter 5.57 (which turns out to be the Exporter that comes with that Perl). The problem goes away if you install Exporter 5.59 (the first dual-life version), or (of course) if you install Exporter 5.63 (the current version).
On Mon Sep 06 17:57:55 2010, WYANT wrote: Show quoted text
> For what it's worth, I have duplicated the problem under Perl 5.8.3 with > Exporter 5.57 (which turns out to be the Exporter that comes with that > Perl). The problem goes away if you install Exporter 5.59 (the first > dual-life version), or (of course) if you install Exporter 5.63 (the > current version).
PS - I used a small, do-nothing module to duplicate the problem; it exported subroutines foo() and bar(), both directly and via tags :foo and :bar respectively. $ ./perl -MFubar=:bar,foo -e 'bar' worked, but $ ./perl -MFubar=foo,:bar -e 'bar' did not. I eventually installed this Perl so I could update it, but the test fails from the build directory.
Subject: Re: [rt.cpan.org #61071] OptionsProcessor vs perl 5.8.3 Exporter
Date: Tue, 07 Sep 2010 08:36:44 +1000
To: bug-Perl-Critic [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Tom Wyant via RT" <bug-Perl-Critic@rt.cpan.org> writes: Show quoted text
> > we have a pass under 5.8.3, but the report says Exporter 5.63 is > installed,
Yes. Show quoted text
> Do we juggle the import tags? Or do we require a minimum version of > Exporter,
My inclination on such a small thing would be to follow what the supplied Exporter required, rather than asking for an upgrade. But perhaps other parts of the tools drag in the upgrade anyway, in which case it'd be just a matter of declaring what OptionsProcessor and/or Utils wants. It's possible the following might be affected too, just from a grep, without actually running them up. Perl::Critic::Policy::Modules::ProhibitExportingUndeclaredSubs Perl::Critic::Policy::Modules::RequireExplicitInclusion Perl::Critic::StricterSubs::Utils Show quoted text
> For what it's worth, I have duplicated the problem under Perl 5.8.3 with > Exporter 5.57 (which turns out to be the Exporter that comes with that > Perl). The problem goes away if you install Exporter 5.59
I think the change in in Exporter/Heavy.pm between 5.8.3 Exporter 5.57, if ($imports[0] =~ m#^[/!:]#){ and 5.8.4 Exporter 5.58, if (grep m{^[/!:]}, @imports) { may be the operative bit.
Subject: Re: [rt.cpan.org #61071] OptionsProcessor vs perl 5.8.3 Exporter
Date: Tue, 07 Sep 2010 09:24:48 +1000
To: bug-Perl-Critic [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Tom Wyant via RT" <bug-Perl-Critic@rt.cpan.org> writes: Show quoted text
> > $ ./perl -MFubar=foo,:bar -e 'bar' > > did not.
Yes, that's it. "Don't do that" as they say in the classics :). -- The sigfile one-line dictionary series: "gastro pub" -- 1. a pub serving food likely to give you a bout of gastro
On Mon Sep 06 18:37:39 2010, user42@zip.com.au wrote: Show quoted text
> "Tom Wyant via RT" <bug-Perl-Critic@rt.cpan.org> writes:
> > > > we have a pass under 5.8.3, but the report says Exporter 5.63 is > > installed,
> > Yes. >
> > Do we juggle the import tags? Or do we require a minimum version of > > Exporter,
> > My inclination on such a small thing would be to follow what the > supplied Exporter required, rather than asking for an upgrade.
Allow me to play devil's advocate for a moment. The decision to install Perl::Critic is a decision to install modules. Why not go with the less buggy version of Exporter? CPAN testers claims the current version works back to 5.6.1. The ulterior motive here is that if we require a reasonably modern version of Exporter, we don't have to hope everyone who works on Perl::Critic remembers the idiosyncrasies of the older Exporter. Because we know they won't, and this will just crop up again. Show quoted text
> > But perhaps other parts of the tools drag in the upgrade anyway, in > which case it'd be just a matter of declaring what OptionsProcessor > and/or Utils wants. > > It's possible the following might be affected too, just from a grep, > without actually running them up. > > Perl::Critic::Policy::Modules::ProhibitExportingUndeclaredSubs > Perl::Critic::Policy::Modules::RequireExplicitInclusion > Perl::Critic::StricterSubs::Utils >
> > For what it's worth, I have duplicated the problem under Perl 5.8.3 with > > Exporter 5.57 (which turns out to be the Exporter that comes with that > > Perl). The problem goes away if you install Exporter 5.59
> > I think the change in in Exporter/Heavy.pm between 5.8.3 Exporter 5.57, > > if ($imports[0] =~ m#^[/!:]#){ > > and 5.8.4 Exporter 5.58, > > if (grep m{^[/!:]}, @imports) { > > may be the operative bit.
Looks likely to me, though 5.58 is still joined at the hip to Perl.
Updated inc/Perl/Critic/BuildUtilities.pm to require Exporter 5.63 (the current version), which CPAN testers claims works on Perl 5.6.1. This change committed as SVN revision 3919. Version 5.59 would also have worked, but since backwards compatibility appears not to be a problem, I went with the latest and (presumably) greatest.
Corrected Changes file entry as SVN revision 3920.