Codebase list libdbix-class-perl / b567407
Not sure what I was thinking, but 18637ebb never worked :/ While at it work around the newly-discovered RT#106935 Peter Rabbitson 8 years ago
2 changed file(s) with 26 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
22
33 use warnings;
44 use strict;
5
6 # temporary, to load MRO::Compat, will be soon entirely rewritten anyway
7 use DBIx::Class::_Util;
58
69 use base 'Data::Page';
710 use mro 'c3';
11 use strict;
22
33 use Test::More;
4 use File::Find;
5 use File::Spec;
6 use Config;
47 use lib 't/lib';
58 use DBICTest;
69
1720 # that are related to lib/ - then we should be able to run
1821 # perl -c checks (via syntax_ok), and all should just work
1922 my $missing_groupdeps_present = grep
20 { DBIx::Class::Optional::Dependencies->req_ok_for($_) }
23 { ! DBIx::Class::Optional::Dependencies->req_ok_for($_) }
2124 grep
2225 { $_ !~ /^ (?: test | rdbms | dist ) _ /x }
2326 keys %{DBIx::Class::Optional::Dependencies->req_group_list}
2427 ;
28
29 # don't test syntax when RT#106935 is triggered (mainly CI)
30 # FIXME - remove when RT is resolved
31 my $tainted_relpath = (
32 length $ENV{PATH}
33 and
34 ${^TAINT}
35 and
36 grep
37 { ! File::Spec->file_name_is_absolute($_) }
38 split /\Q$Config{path_sep}/, $ENV{PATH}
39 ) ? 1 : 0;
2540
2641 find({
2742 wanted => sub {
3954 Test::Strict::strict_ok($f);
4055 Test::Strict::warnings_ok($f);
4156
42 Test::Strict::syntax_ok($f)
43 if ! $missing_groupdeps_present and $f =~ /^ (?: lib )/x;
57 Test::Strict::syntax_ok($f) if (
58 ! $tainted_relpath
59 and
60 ! $missing_groupdeps_present
61 and
62 $f =~ /^ (?: lib )/x
63 );
4464 },
4565 no_chdir => 1,
4666 }, (qw(lib t examples maint)) );