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