| 3 | | eval { |
| 4 | | require Test::Perl::Critic; |
| 5 | | Test::Perl::Critic->import( -profile => 't/perlcriticrc'); |
| 6 | | }; |
| 7 | | plan skip_all => "Test::Perl::Critic is not installed." if $@; |
| 8 | | all_critic_ok('lib'); |
| | 3 | |
| | 4 | if (! $ENV{TEST_CRITIC}) { |
| | 5 | plan(skip_all => "Set TEST_CRITIC environment variable to run this test"); |
| | 6 | } else { |
| | 7 | eval { |
| | 8 | require Test::Perl::Critic; |
| | 9 | require Perl::Critic; |
| | 10 | die "oops. very old." if $Perl::Critic::VERSION < 1.082; |
| | 11 | Test::Perl::Critic->import( -profile => 't/perlcriticrc'); |
| | 12 | }; |
| | 13 | plan skip_all => "Test::Perl::Critic >= 1.082 is not installed." if $@; |
| | 14 | all_critic_ok('lib'); |
| | 15 | } |