Commit | Line | Data |
4a233f30 |
1 | use warnings; |
2 | use strict; |
3 | |
4 | use Test::More; |
5 | use lib 't/lib'; |
dfaed1c7 |
6 | use DBICTest; |
4a233f30 |
7 | |
8 | unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_strictures') ) { |
9 | my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('test_strictures'); |
10 | $ENV{RELEASE_TESTING} |
11 | ? die ("Failed to load release-testing module requirements: $missing") |
12 | : plan skip_all => "Test needs: $missing" |
13 | } |
14 | |
15 | |
16 | use File::Find; |
17 | |
18 | find({ |
19 | wanted => sub { |
20 | -f $_ or return; |
21 | m/\.(?: pm | pl | t )$ /ix or return; |
22 | |
23 | return if m{^(?: |
24 | maint/Makefile.PL.inc/.+ # all the maint inc snippets are auto-strictured |
25 | | |
4a233f30 |
26 | t/lib/DBICTest/Util/OverrideRequire.pm # no stictures by design (load order sensitive) |
27 | )$}x; |
28 | |
29 | my $f = $_; |
30 | |
31 | Test::Strict::strict_ok($f); |
32 | Test::Strict::warnings_ok($f); |
33 | |
34 | #Test::Strict::syntax_ok($f) if $f =~ /^ (?: lib )/x; |
35 | }, |
36 | no_chdir => 1, |
37 | }, (qw(lib t examples maint)) ); |
38 | |
39 | done_testing; |