X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=samples%2Fcheck.pl;h=4703f4d181353b183f4645538ae8537cc374adeb;hb=ea367e59d416e5ce66982f813e8cce81cf5df9d6;hp=f444d9498febe9fcd13b71a8105e5133df3d9ee6;hpb=0da2dc5f631bebe52e26345c287793712603c804;p=perl%2Fmodules%2FPerl-Critic-Policy-Dynamic-NoIndirect.git diff --git a/samples/check.pl b/samples/check.pl index f444d94..4703f4d 100644 --- a/samples/check.pl +++ b/samples/check.pl @@ -5,9 +5,17 @@ use warnings; use blib; -use Perl::Critic::TestUtils qw/pcritique_with_violations/; +use Perl::Critic::TestUtils qw; Perl::Critic::TestUtils::block_perlcriticrc(); my $code = shift || exit; -print for eval { pcritique_with_violations('Dynamic::NoIndirect', \$code) }; +my @violations = eval { + pcritique_with_violations('Dynamic::NoIndirect', \$code) +}; + +if ($@) { + print $@; +} else { + print for @violations; +}