Message-ID: <
40517711.9030204@uk.radan.com>
p4raw-id: //depot/perl@22494
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;