From: Vincent Pit Date: Tue, 7 Jul 2009 19:30:12 +0000 (+0200) Subject: Add a sample script X-Git-Tag: v0.03~5 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FPerl-Critic-Policy-Dynamic-NoIndirect.git;a=commitdiff_plain;h=0da2dc5f631bebe52e26345c287793712603c804 Add a sample script --- diff --git a/MANIFEST b/MANIFEST index c1f8109..477510f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4,6 +4,7 @@ META.yml Makefile.PL README lib/Perl/Critic/Policy/Dynamic/NoIndirect.pm +samples/check.pl t/00-load.t t/10-basic.t t/91-pod.t diff --git a/samples/check.pl b/samples/check.pl new file mode 100644 index 0000000..f444d94 --- /dev/null +++ b/samples/check.pl @@ -0,0 +1,13 @@ +#!perl + +use strict; +use warnings; + +use blib; + +use Perl::Critic::TestUtils qw/pcritique_with_violations/; +Perl::Critic::TestUtils::block_perlcriticrc(); + +my $code = shift || exit; + +print for eval { pcritique_with_violations('Dynamic::NoIndirect', \$code) };