Subject: | Allow Bundle "CONTENTS" Header Case-Insensitivity |
Date: | Mon, 4 Feb 2008 13:55:02 -0800 |
To: | bug-CPAN [...] rt.cpan.org |
From: | "David E. Wheeler" <dwheeler [...] cpan.org> |
I tend to believe that any case should be allowed in `=head` POD
headers, and POD formatters should convert them to uppercase as
appropriate. CPAN.pm, however, currently depends on the `head1
CONTENTS` header in bundles being uppercase. This patch allows the
word "contents" to be matched case-insensitively.
Thanks,
David
--- lib/CPAN.pm.orig 2008-02-04 13:52:13.000000000 -0800
+++ lib/CPAN.pm 2008-02-04 13:52:30.000000000 -0800
@@ -9489,8 +9489,8 @@
my $in_cont = 0;
$self->debug("inst_file[$inst_file]") if $CPAN::DEBUG;
while (<$fh>) {
- $in_cont = m/^=(?!head1\s+CONTENTS)/ ? 0 :
- m/^=head1\s+CONTENTS/ ? 1 : $in_cont;
+ $in_cont = m/^=(?!head1\s+?(i-xsm:CONTENTS)/ ? 0 :
+ m/^=head1\s+?(i-xsm:CONTENTS)/ ? 1 : $in_cont;
next unless $in_cont;
next if /^=/;
s/\#.*//;