7 my $boilerplate_headings = q{
8 =head1 FURTHER QUESTIONS?
10 Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
12 =head1 COPYRIGHT AND LICENSE
14 This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
15 by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
16 redistribute it and/or modify it under the same terms as the
17 L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
25 return unless $fn =~ / \. (?: pm | pod ) $ /ix;
27 my $data = do { local (@ARGV, $/) = $fn; <> };
29 if ($data !~ /^=head1 NAME/m) {
31 # the generator is full of false positives, .pod is where it's at
32 return if $fn =~ qr{\Qlib/DBIx/Class/Optional/Dependencies.pm};
34 ok ( $data !~ /\bcopyright\b/i, "No copyright notices in $fn without apparent POD" );
36 elsif ($fn =~ qr{\Qlib/DBIx/Class.}) {
37 # nothing to check there - a static set of words
40 ok ( $data !~ / ^ =head1 \s $_ /xmi, "No standalone $_ headings in $fn" )
41 for qw(AUTHOR CONTRIBUTOR LICENSE LICENCE);
43 ok ( $data !~ / ^ =head1 \s COPYRIGHT \s (?! AND \s LICENSE )/xmi, "No standalone COPYRIGHT headings in $fn" );
45 ok ($data =~ / \Q$boilerplate_headings\E (?! .*? ^ =head )/xms, "Expected headings found at the end of $fn");
49 }, (qw(lib examples)) );