5 use File::Glob 'bsd_glob';
10 unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_notabs') ) {
11 my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('test_notabs');
13 ? die ("Failed to load release-testing module requirements: $missing")
14 : plan skip_all => "Test needs: $missing"
17 # FIXME - temporary workaround for RT#82033
19 no warnings 'redefine';
20 *Test::NoTabs::_is_perl_module = sub {
21 $_[0] =~ /\.(?:pm|pod)$/i || $_[0] =~ /::/;
25 Test::NoTabs::all_perl_files_ok(
26 qw/t xt lib script examples maint/,
29 # check some non-"perl files" in the root separately
30 # use .gitignore as a guide of what to skip
31 # (or do not test at all if no .gitignore is found)
32 if (open(my $gi, '<', '.gitignore')) {
34 while (my $ln = <$gi>) {
35 next if $ln =~ /^\s*$/;
37 $skipnames->{$_}++ for bsd_glob($ln);
40 for my $fn (bsd_glob('*')) {
41 next if $skipnames->{$fn};
43 Test::NoTabs::notabs_ok($fn);
47 # FIXME - Test::NoTabs declares 'no_plan' which conflicts with done_testing
48 # https://github.com/schwern/test-more/issues/14