Subject: | [PATCH Pod::Man::devise_title] don't look past the end of an array |
When devise_title is working its way through an array and the last element in that array is 'lib', it
will look off the end of the array to see if the last plus one element matches /perl/. This causes
a lot of undefined value warnings in the Module::Build tests in bleadperl.
The attached is just a bit of a band-aid to make sure it doesn't walk off the end of the array;
there may be some better way to restructure the code.
Subject: | podman.patch.txt |
--- lib/Pod/Man.pm;-0 Sat Sep 8 11:42:16 2007
+++ lib/Pod/Man.pm Sat Sep 8 19:01:47 2007
@@ -40,7 +40,7 @@ use POSIX qw(strftime);
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = '2.12';
+$VERSION = '2.12_01';
# Set the debugging level. If someone has inserted a debug function into this
# class already, use that. Otherwise, use any Pod::Simple debug function
@@ -792,7 +792,7 @@ sub devise_title {
my $cut = 0;
my $i;
for ($i = 0; $i < scalar @dirs; $i++) {
- if ($dirs[$i] eq 'lib' && $dirs[$i + 1] =~ /perl/) {
+ if ($dirs[$i] eq 'lib' && $i+1 < scalar(@dirs) && $dirs[$i + 1] =~ /perl/) {
$cut = $i + 2;
last;
} elsif ($dirs[$i] =~ /perl/) {