2 # $Id: strict.t 3236 2007-05-05 16:24:35Z claco $
\r
12 plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
\r
14 eval 'use Test::Strict';
\r
15 plan skip_all => 'Test::Strict not installed' if $@;
\r
16 plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006;
\r
19 ## I hope this can go away if Test::Strict or File::Find::Rule
\r
20 ## finally run under -T. Until then, I'm on my own here. ;-)
\r
26 find({ wanted => \&wanted,
\r
28 untaint_pattern => qr|^([-+@\w./]+)$|,
\r
34 my $name = $File::Find::name;
\r
35 my $file = fileparse($name);
\r
37 return if $name =~ /TestApp/;
\r
39 if ($name =~ /\.(pm|pl|t)$/i && !exists($trusted{$file})) {
\r
44 if (scalar @files) {
\r
45 plan tests => scalar @files;
\r
48 fail 'No perl files found for Test::Strict checks!';
\r