2 # Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the OpenSSL license (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
16 my $temp = '/tmp/docnits.txt';
24 open POD, $_ or die "Couldn't open $_, $!";
28 print $OUT "$_ doesn't start with =pod\n"
29 if $contents !~ /^=pod/;
30 print $OUT "$_ doesn't end with =cut\n"
31 if $contents !~ /=cut\n$/;
32 print $OUT "$_ more than one cut line.\n"
33 if $contents =~ /=cut.*=cut/ms;
34 print $OUT "$_ missing copyright\n"
35 if $contents !~ /Copyright .* The OpenSSL Project Authors/;
36 print $OUT "$_ copyright not last\n"
37 if $contents =~ /head1 COPYRIGHT.*=head/ms;
38 print $OUT "$_ head2 in All uppercase\n"
39 if $contents =~ /head2.*[A-Z ]+\n/;
45 or die "Can't open $temp, $!";
46 foreach (@ARGV ? @ARGV : glob('*/*.pod')) {
53 or die "Can't read $temp, $!";
55 next if /\(section\) in.*deprecated/;
60 unlink $temp || warn "Can't remove $temp, $!";