diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-28 18:44:33 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-28 18:44:33 +0000 |
commit | e03d20b37534005291cfa8844300128459541e0e (patch) | |
tree | 512dd397e958883f28c29a624c0fc6dcc975d5f2 /lib/ExtUtils | |
parent | 0eb0485562acdea1555bc121d0e989d63a918d26 (diff) | |
download | perl-e03d20b37534005291cfa8844300128459541e0e.tar.gz |
make xsubpp skip embedded pod (from Matthias Neeracher
<neeri@iis.ee.ethz.ch>)
p4raw-id: //depot/perl@6145
Diffstat (limited to 'lib/ExtUtils')
-rwxr-xr-x | lib/ExtUtils/xsubpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index 5a71e89636..30b264c0a6 100755 --- a/lib/ExtUtils/xsubpp +++ b/lib/ExtUtils/xsubpp @@ -847,7 +847,14 @@ EOM print("#line 1 \"$filename\"\n") if $WantLineNumbers; +firstmodule: while (<$FH>) { + if (/^=/) { + do { + next firstmodule if /^=cut\s*$/; + } while (<$FH>); + &Exit; + } last if ($Module, $Package, $Prefix) = /^MODULE\s*=\s*([\w:]+)(?:\s+PACKAGE\s*=\s*([\w:]+))?(?:\s+PREFIX\s*=\s*(\S+))?\s*$/; @@ -886,6 +893,16 @@ sub fetch_para { } for(;;) { + # Skip embedded PODs + while ($lastline =~ /^=/) { + while ($lastline = <$FH>) { + last if ($lastline =~ /^=cut\s*$/); + } + death ("Error: Unterminated pod") unless $lastline; + $lastline = <$FH>; + chomp $lastline; + $lastline =~ s/^\s+$//; + } if ($lastline !~ /^\s*#/ || # CPP directives: # ANSI: if ifdef ifndef elif else endif define undef |