[users] perl-Perl-Critic requires Module::Pluggable

Philip Durbin pdurbin at hmdc.harvard.edu
Mon Jul 14 22:36:28 CEST 2008


Module::Pluggable is required by Perl::Critic and installing
perl-Module-Pluggable-3.8-1.el4.rf fixed the errors I saw below with 
perl-Perl-Critic-1.082-1.el4.rf on RHEL4.

Can Module::Pluggable be added as a dependency in the spec or otherwise?
http://dag.wieers.com/rpm/packages/perl-Perl-Critic/perl-Perl-Critic.spec

Thanks,

Phil

[pdurbin at beamish ~]$ perlcritic test.pl
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.5/Perl/Critic/Config.pm line 22.
Compilation failed in require at
/usr/lib/perl5/vendor_perl/5.8.5/Perl/Critic.pm line 25.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.5/Perl/Critic.pm line 25.
Compilation failed in require at /usr/bin/perlcritic line 211.
[pdurbin at beamish ~]$
[pdurbin at beamish ~]$
[pdurbin at beamish ~]$ cat -n
/usr/lib/perl5/vendor_perl/5.8.5/Perl/Critic/Config.pm | sed -n '/ 22\t/p'
     22  use Perl::Critic::PolicyFactory;
[pdurbin at beamish ~]$
[pdurbin at beamish ~]$ perl -e 'use Perl::Critic::PolicyFactory;'
BEGIN failed--compilation aborted at -e line 1.
[pdurbin at beamish ~]$
[pdurbin at beamish ~]$ perl -d -e 1

Loading DB routines from perl5db.pl version 1.27
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(-e:1):   1
   DB<1> use Perl::Critic::PolicyFactory;
  at /usr/lib/perl5/vendor_perl/5.8.5/Exception/Class.pm line 246
 
Exception::Class::Base::throw('Perl::Critic::Exception::Fatal::Generic', 
'Can\'t load Policies from namespace "Perl::Critic::Policy": C...') 
called at /usr/lib/perl5/vendor_perl/5.8.5/Exception/Class.pm line 167
 
Exception::Class::__ANON__[/usr/lib/perl5/vendor_perl/5.8.5/Exception/Class.pm:167]('Can\'t 
load Policies from namespace "Perl::Critic::Policy": C...') called at 
/usr/lib/perl5/vendor_perl/5.8.5/Perl/Critic/PolicyFactory.pm line 59
 
Perl::Critic::PolicyFactory::import('Perl::Critic::PolicyFactory') 
called at (eval 5)[/usr/lib/perl5/5.8.5/perl5db.pl:620] line 2
         main::BEGIN() called at 
/usr/lib/perl5/vendor_perl/5.8.5/Perl/Critic/PolicyFactory.pm line 2
         eval {...} called at 
/usr/lib/perl5/vendor_perl/5.8.5/Perl/Critic/PolicyFactory.pm line 2
         eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; 
$^D = $^D | $DB::db_stop;
use Perl::Critic::PolicyFactory;;

;' called at /usr/lib/perl5/5.8.5/perl5db.pl line 620
         DB::eval called at /usr/lib/perl5/5.8.5/perl5db.pl line 3292
         DB::DB called at -e line 1
BEGIN failed--compilation aborted at (eval 
5)[/usr/lib/perl5/5.8.5/perl5db.pl:620] line 2.
  at (eval 5)[/usr/lib/perl5/5.8.5/perl5db.pl:620] line 2
         eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package main; 
$^D = $^D | $DB::db_stop;
use Perl::Critic::PolicyFactory;;

;' called at /usr/lib/perl5/5.8.5/perl5db.pl line 620
         DB::eval called at /usr/lib/perl5/5.8.5/perl5db.pl line 3292
         DB::DB called at -e line 1

   DB<2> q
[pdurbin at beamish ~]$
[pdurbin at beamish ~]$ grep "load Policies" 
/usr/lib/perl5/vendor_perl/5.8.5/Perl/Critic/PolicyFactory.pm -B10
     if ( not @SITE_POLICY_NAMES ) {
         eval {
             require Module::Pluggable;
             Module::Pluggable->import(search_path => $POLICY_NAMESPACE,
                                       require => 1, inner => 0);
             @SITE_POLICY_NAMES = plugins(); #Exported by Module::Pluggable
         };

         if ( $EVAL_ERROR ) {
             throw_generic
                 qq{Can't load Policies from namespace 
"$POLICY_NAMESPACE": $EVAL_ERROR};
[pdurbin at beamish ~]$

-- 
Philip A. Durbin
Systems Administrator
Harvard-MIT Data Center





More information about the users mailing list