next if /^\#/;
# At least one upper case letter somewhere in the first group
- if (/^(\S+)\s(.*)/ && $1 =~ tr/A-Z//) {
+ if (/^(\S+)\s(.*)/ && $1 =~ tr/h//) {
# it's a heading
my $flags = $1;
+ $flags =~ tr/h//d;
my %flags = (header => 1);
- $flags{toc_omit} = 1 if $flags =~ tr/O//d;
- $flags{include} = 1 if $flags =~ tr/I//d;
- $flags{aux} = 1 if $flags =~ tr/A//d;
+ $flags{toc_omit} = 1 if $flags =~ tr/o//d;
+ $flags{aux} = 1 if $flags =~ tr/a//d;
die "$0: Unknown flag found in heading line: $_" if length $flags;
push @Master, [\%flags, $2];
return if $file =~ m!lib/Math/BigInt/t/!;
return if $file =~ m!/Devel/PPPort/[Hh]arness|lib/Devel/Harness!i;
return if $file =~ m!XS/(?:APItest|Typemap)!;
+ my $pod = $file;
+ return if $pod =~ s/pm$/pod/ && -e $pod;
die "$0: tut $File::Find::name" if $file =~ /TUT/;
unless (open (F, "< $_\0")) {
warn "$0: bogus <$file>: $!";
sub output_perltoc {
open(OUT, ">perltoc.pod") || die "$0: creating perltoc.pod failed: $!";
- $/ = '';
+ local $/ = '';
($_= <<"EOPOD2B") =~ s/^\t//gm && output($_);
my $pod;
while(<>) {
+ tr/\015//d;
if (s/^=head1 (NAME)\s*/=head2 /) {
$pod = path2modname($ARGV);
unhead1();
sub do_podmak {
my $name = shift;
my $body = join '', @_;
- foreach my $variable qw(pod man html tex) {
+ foreach my $variable (qw(pod man html tex)) {
die "$0: could not find $variable in $name"
unless $body =~ s{\n\U$variable\E = (?:[^\n]*\\\n)*[^\n]*}
{"\n" . generate_pod_mak ($variable)}se;
next unless $Build{$target};
$built++;
if ($target eq "toc") {
+ print "Now processing $name\n" if $Verbose;
&output_perltoc;
+ print "Finished\n" if $Verbose;
next;
}
print "Now processing $name\n" if $Verbose;