--- /dev/null
+#!perl -wT\r
+# $Id: warnings.t 3236 2007-05-05 16:24:35Z claco $\r
+use strict;\r
+use warnings;\r
+\r
+BEGIN {\r
+ use lib 't/lib';\r
+ use DBIC::Test;\r
+ use File::Find;\r
+ use File::Basename;\r
+\r
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};\r
+\r
+ eval 'use Test::Strict 0.05';\r
+ plan skip_all => 'Test::Strict 0.05 not installed' if $@;\r
+ plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006;\r
+};\r
+\r
+## I hope this can go away if Test::Strict or File::Find::Rule\r
+## finally run under -T. Until then, I'm on my own here. ;-)\r
+my @files;\r
+my %trusted = (\r
+\r
+);\r
+\r
+find({ wanted => \&wanted,\r
+ untaint => 1,\r
+ untaint_pattern => qr|^([-+@\w./]+)$|,\r
+ untaint_skip => 1,\r
+ no_chdir => 1\r
+}, qw(lib t));\r
+\r
+sub wanted {\r
+ my $name = $File::Find::name;\r
+ my $file = fileparse($name);\r
+\r
+ return if $name =~ /TestApp/;\r
+\r
+ if ($name =~ /\.(pm|pl|t)$/i && !exists($trusted{$file})) {\r
+ push @files, $name;\r
+ };\r
+};\r
+\r
+if (scalar @files) {\r
+ plan tests => scalar @files;\r
+} else {\r
+ plan tests => 1;\r
+ fail 'No perl files found for Test::Strict checks!';\r
+};\r
+\r
+foreach (@files) {\r
+ warnings_ok($_);\r
+};\r