Author: ericwilhelm
Date: Sun Apr 15 16:32:55 2007
New Revision: 9416
Modified:
Module-Build/trunk/lib/Module/Build/Base.pm
Module-Build/trunk/t/help.t
Log:
lib/Module/Build/Base.pm - eliminate the head[34] support in get_action_docs()
(eliminates some edge issues and head[34] were not in 5.005 anyway)
t/help.t - get rid of =head3 bits
Modified: Module-Build/trunk/lib/Module/Build/Base.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Base.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Base.pm Sun Apr 15 16:32:55 2007
@@ -1886,8 +1886,8 @@
while (<$fh>) {
last if /^=head1 /;
- # hmm, head2 is good, but do we need to allow 3,4?
- if(/^=(item|head[2-4])\s+\Q$action\E\b/) {
+ # only item and head2 are allowed (3&4 are not in 5.005)
+ if(/^=(item|head2)\s+\Q$action\E\b/) {
$style = $1;
push @docs, $_;
last;
@@ -1907,11 +1907,10 @@
--$inlist if /^=back/;
}
}
- else { # head style
+ else { # head2 style
# stop at anything equal or greater than the found level
- my $heads = 'head[1-'. ($style =~ m/(\d)$/)[0] . ']';
while (<$fh>) {
- last if(/^=(?:$heads|back|cut)/);
+ last if(/^=(?:head[12]|cut)/);
push @docs, $_;
}
}
Modified: Module-Build/trunk/t/help.t
==============================================================================
--- Module-Build/trunk/t/help.t (original)
+++ Module-Build/trunk/t/help.t Sun Apr 15 16:32:55 2007
@@ -229,15 +229,15 @@
# Though, I do wonder whether we should allow them to mix...
# maybe everything should have to be head2?
- =head3 baz
+ =head2 baz
Does the baz thing.
=head4 What's a baz?
- =head3 not this part
+ =head1 not this part
- This is level 3, so the stuff about baz is done.
+ This is level 1, so the stuff about baz is done.
=head1 Thing