]> git.vpit.fr Git - perl/modules/Perl-Critic-Policy-Dynamic-NoIndirect.git/commitdiff
Add a sample script
authorVincent Pit <vince@profvince.com>
Tue, 7 Jul 2009 19:30:12 +0000 (21:30 +0200)
committerVincent Pit <vince@profvince.com>
Wed, 8 Jul 2009 22:57:49 +0000 (00:57 +0200)
MANIFEST
samples/check.pl [new file with mode: 0644]

index c1f8109d1a5ae17e4d722a6423f6510c1f4c859b..477510f90240ca8677b6f70268c7db575adfb9d4 100644 (file)
--- 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 (file)
index 0000000..f444d94
--- /dev/null
@@ -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) };