Subject: | pod2usage(-verbose => 1) fails with whitespace after SYNOPSIS |
If -verbose is set to 1, then pod2usage does not account for whitespace
after SYNOPSIS in the pod section.
Patch attached.
Tested against perl 5.8.5 and Pod::Usage 1.35 on RHEL5.
Subject: | usage.diff |
--- Usage_ORIG.pm 2008-08-21 16:39:35.022999884 -0700
+++ Usage.pm 2008-08-21 16:37:23.742055153 -0700
@@ -529,7 +529,7 @@
my $opt_re = '(?i)' .
'(?:OPTIONS|ARGUMENTS)' .
'(?:\s*(?:AND|\/)\s*(?:OPTIONS|ARGUMENTS))?';
- $parser->select( 'SYNOPSIS', $opt_re, "DESCRIPTION/$opt_re" );
+ $parser->select( 'SYNOPSIS\s*', $opt_re, "DESCRIPTION/$opt_re" );
}
elsif ($opts{"-verbose"} >= 2 && $opts{"-verbose"} != 99) {
$parser->select('.*');