Subject: | Perlcritic |
The RT::Client::REST - modules can't be used together with
Perl::Critic - modules, as the attached script illustrates.
This is due to the "magic" involving Error and Exception::Class::Base
that occurs in RT::Client::REST::Exception.
I am using perl 5.12.2 and the latest distributions of both packages
(0.41 and 1.111, respectively).
Here is the stacktrace from trying to run the attached script:
"throw_generic" is not exported by the Error::subs module
Can't continue after import errors
at /home/perl/lib/site_perl/5.12.2/Error.pm line 63
BEGIN failed--compilation aborted
at /home/perl/lib/site_perl/5.12.2/Perl/Critic/Utils.pm line 25.
Compilation failed in require
at /home/perl/lib/site_perl/5.12.2/Perl/Critic/Exception/AggregateConfig
uration.pm line 18.
BEGIN failed--compilation aborted
at /home/perl/lib/site_perl/5.12.2/Perl/Critic/Exception/AggregateConfig
uration.pm line 18.
Compilation failed in require
at /home/perl/lib/site_perl/5.12.2/Perl/Critic/Config.pm line 20.
BEGIN failed--compilation aborted
at /home/perl/lib/site_perl/5.12.2/Perl/Critic/Config.pm line 20.
Compilation failed in require
at /home/perl/lib/site_perl/5.12.2/Perl/Critic.pm line 24.
BEGIN failed--compilation aborted
at /home/perl/lib/site_perl/5.12.2/Perl/Critic.pm line 24.
Compilation failed in require at bin/error.pl line 14.
BEGIN failed--compilation aborted at bin/error.pl line 14.
Subject: | error.pl |
#!/usr/bin/perl
use strict;
use warnings;
=item DESCRIPTION
Perl::Critic does not compile when used after RT::Client::REST.
If you reverse the order of the use statements, the problem does not occur.
=cut
use RT::Client::REST;
use Perl::Critic;