summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2007-09-09 00:31:51 +0000
committerCraig A. Berry <craigberry@mac.com>2007-09-09 00:31:51 +0000
commitf7befa134c5fcd96ce7c34d7921b8eb76021ef9a (patch)
treed5cd4c86031e092c679200b35aee571141443bde /lib/Pod
parent6dbe9451abb7e30d650de45d484c69e6c34bbd36 (diff)
downloadperl-f7befa134c5fcd96ce7c34d7921b8eb76021ef9a.tar.gz
Band-aid for Pod::Man::devise_title to keep it from looking
beyond the end of an array and generating undefined warnings. p4raw-id: //depot/perl@31825
Diffstat (limited to 'lib/Pod')
-rw-r--r--lib/Pod/Man.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Pod/Man.pm b/lib/Pod/Man.pm
index 077bd7b5ec..a8b41bbf26 100644
--- a/lib/Pod/Man.pm
+++ b/lib/Pod/Man.pm
@@ -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/) {