On Oct 26, 2006, at 5:21 AM, Paul Cochrane (via RT) wrote:
this patch ensures that when t/codingstd/perlcritic.t can't find
Test::Perl::Critic, that instead of exiting with a "Can't locate
Test/Perl/Critic.pm in @INC" compile-time error, it reports that it is
skipping the test with the message defined in perlcritic.t.
One can't use C<require> in this case as the C<use> call needs to pass
an argument to the package if Test::Perl::Critic is found.
Comments welcome,
Paul,
A better implementation of that patch would be:
BEGIN {
eval { require Test::Perl::Critic; };
if ($@) {
plan skip_all => 'Test::Perl::Critic not installed';
}
Test::Perl::Critic->import(-verbose => 7);
Chris