3 use lib '../lib'; # If you haven't installed perl yet.
13 next unless /^=(?!cut)/ .. /^=cut/;
18 # Ignore items that are nested within other items, e.g. don't split on the
19 # items nested within the pack() and sprintf() items in perlfunc.pod.
20 if (/=item (\S+)/ and $level == 1) {
29 push @{$pod{$cur}}, $_ if $cur;
33 for $f ( keys %syn ) {
34 next unless $Type{$f};
35 $flavor = $Flavor{$f};
37 ($name = $f) =~ s/\W//g;
39 # deal with several functions sharing a description
41 $func = $next{$func} until $pod{$func};
42 my $body = join "", @{$pod{$func}};
44 # deal with unbalanced =over and =back cause by the split
45 my $has_over = $body =~ /^=over/;
46 my $has_back = $body =~ /^=back/;
47 $body =~ s/^=over\s*//m if $has_over and !$has_back;
48 $body =~ s/^=back\s*//m if $has_back and !$has_over;
49 open (POD, "> $name.pod") || die "can't open $name.pod: $!";