New Test::Strict no longer detects Moose::Role (RT#83433) - workaround
[dbsrgits/DBIx-Class.git] / xt / strictures.t
CommitLineData
4a233f30 1use warnings;
2use strict;
3
4use Test::More;
5use lib 't/lib';
6use DBICTest ':GlobalLock';
7
8unless ( 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
16use File::Find;
17
18find({
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 |
26 lib/DBIx/Class/Admin/Types.pm # MooseX::Types undetected
27 |
28 lib/DBIx/Class/Storage/DBI/Replicated/Types.pm # MooseX::Types undetected
29 |
30 lib/DBIx/Class/Storage/BlockRunner.pm # Moo undetected
31 |
32 t/lib/DBICTest/Util/OverrideRequire.pm # no stictures by design (load order sensitive)
9e6eeb1b 33 |
34 lib/DBIx/Class/Storage/DBI/Replicated/Replicant.pm # Moose::Role no longer detected (RT#83433)
35 |
36 lib/DBIx/Class/Storage/DBI/Replicated/WithDSN.pm # Moose::Role no longer detected (RT#83433)
37 |
38 lib/DBIx/Class/Storage/DBI/Replicated/Balancer.pm # Moose::Role no longer detected (RT#83433)
4a233f30 39 )$}x;
40
41 my $f = $_;
42
43 Test::Strict::strict_ok($f);
44 Test::Strict::warnings_ok($f);
45
46 #Test::Strict::syntax_ok($f) if $f =~ /^ (?: lib )/x;
47 },
48 no_chdir => 1,
49}, (qw(lib t examples maint)) );
50
51done_testing;