CC: | HOLCAPEK [...] cpan.org |
Subject: | t/96-perl-critic.t may fail |
Some of my smoker systems started to report the following failure:
...
# Failed test 'lib/SVG.pm'
# at t/96-perl-critic.t line 25.
#
# Perl::Critic had errors in "lib/SVG.pm":
# Exception::Fatal::PolicyDefinition: A bug in a policy was found.
#
# Unable to create policy "Perl::Critic::Policy::ProhibitSmartmatch": Can't locate object method "new" via package "Perl::Critic::Policy::ProhibitSmartmatch" at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 253.
#
#
# Wed Nov 22 05:51:07 2017
#
# Trace begun at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 282
# Perl::Critic::PolicyFactory::_handle_policy_instantiation_exception('Perl::Critic::Policy::ProhibitSmartmatch', undef, 'Can\'t locate object method "new" via package "Perl::Critic::Policy::ProhibitSmartmatch" at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 253.^J') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 254
# Perl::Critic::PolicyFactory::_instantiate_policy('Perl::Critic::PolicyFactory=HASH(0x49705d08)', 'Perl::Critic::Policy::ProhibitSmartmatch', 'Perl::Critic::PolicyConfig=HASH(0x497ca720)') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 197
# Perl::Critic::PolicyFactory::create_policy('Perl::Critic::PolicyFactory=HASH(0x49705d08)', '-name', 'Perl::Critic::Policy::ProhibitSmartmatch') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 213
# eval {...} at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 213
# Perl::Critic::PolicyFactory::create_all_policies('Perl::Critic::PolicyFactory=HASH(0x49705d08)', 'Perl::Critic::Exception::AggregateConfiguration=HASH(0x43ca7150)') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/Config.pm line 212
# Perl::Critic::Config::_load_policies('Perl::Critic::Config=HASH(0x4926c0a8)', 'Perl::Critic::Exception::AggregateConfiguration=HASH(0x43ca7150)') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/Config.pm line 143
# Perl::Critic::Config::_init('Perl::Critic::Config=HASH(0x4926c0a8)') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/Config.pm line 45
# Perl::Critic::Config::new('Perl::Critic::Config') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic.pm line 35
# Perl::Critic::new('Perl::Critic') called at /home/cpansand/.cpan/build/2017112203/Test-Perl-Critic-1.03-0/blib/lib/Test/Perl/Critic.pm line 64
# eval {...} at /home/cpansand/.cpan/build/2017112203/Test-Perl-Critic-1.03-0/blib/lib/Test/Perl/Critic.pm line 63
# Test::Perl::Critic::critic_ok('lib/SVG.pm', 'lib/SVG.pm') called at t/96-perl-critic.t line 25
... (etc) ...
It looks like it's a problem in an additional perlcritic policy (cc'ed holcapek) --- but anyway, maybe it's a good idea to make the test an author-only test?
Regards,
Slaven