From: Steve Hay Date: Fri, 12 Mar 2004 08:38:41 +0000 (+0000) Subject: Re: [PATCH] Stop splitpod truncating sprintf manpage X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c98129fd14ae24244bde1f7f87508f60058f99b;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Stop splitpod truncating sprintf manpage Message-ID: <40517711.9030204@uk.radan.com> p4raw-id: //depot/perl@22494 --- diff --git a/pod/splitpod b/pod/splitpod index ff60ddc..d5963bf 100755 --- a/pod/splitpod +++ b/pod/splitpod @@ -5,12 +5,19 @@ use Pod::Functions; local $/ = ''; +$level = 0; + $cur = ''; while (<>) { next unless /^=(?!cut)/ .. /^=cut/; - if (/=item (\S+)/ and $1 ne '*') { + ++$level if /^=over/; + --$level if /^=back/; + + # Ignore items that are nested within other items, e.g. don't split on the + # items nested within the pack() and sprintf() items in perlfunc.pod. + if (/=item (\S+)/ and $level == 1) { my $item = $1; s/=item //; $next{$cur} = $item;