1 BEGIN { $ENV{DBICTEST_ANFANG_DEFANG} = 1 }
10 use DBICTest; # for the lock
11 use DBICTest::Util 'slurp_bytes';
13 my $boilerplate_headings = q{
14 =head1 FURTHER QUESTIONS?
16 Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
18 =head1 COPYRIGHT AND LICENSE
20 This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
21 by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
22 redistribute it and/or modify it under the same terms as the
23 L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
31 return unless $fn =~ / \. (?: pm | pod ) $ /ix;
32 return if $fn =~ qr{\Qlib/DBIx/Class/_TempExtlib/};
34 my $data = slurp_bytes $fn;
36 if ($data !~ /^=head1 NAME/m) {
38 # the generator is full of false positives, .pod is where it's at
39 return if $fn =~ qr{\Qlib/DBIx/Class/Optional/Dependencies.pm};
41 ok ( $data !~ /\bcopyright\b/i, "No copyright notices in $fn without apparent POD" );
43 elsif ($fn =~ qr{\Qlib/DBIx/Class.}) {
44 # nothing to check there - a static set of words
47 ok ( $data !~ / ^ =head1 \s $_ /xmi, "No standalone $_ headings in $fn" )
48 for qw(AUTHOR CONTRIBUTOR LICENSE LICENCE);
50 ok ( $data !~ / ^ =head1 \s COPYRIGHT \s (?! AND \s LICENSE )/xmi, "No standalone COPYRIGHT headings in $fn" );
52 ok ($data =~ / \Q$boilerplate_headings\E (?! .*? ^ =head )/xms, "Expected headings found at the end of $fn");
56 }, (qw(lib examples)) );