summaryrefslogtreecommitdiff
path: root/recipes/perl/perl-5.8.8/54_debian_perldoc-r.patch
blob: 432cd857a79427185f1442fb4290306e511fe577 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
In a Debian installation, not all directories in @INC need exist (the
site directories for example are created on demand).

Suggested by Joey Hess <joeyh@debian.org>.

diff -Naur --exclude=debian perl-5.8.8.orig/lib/Pod/Perldoc.pm perl-5.8.8/lib/Pod/Perldoc.pm
--- perl-5.8.8.orig/lib/Pod/Perldoc.pm	2004-12-29 23:15:33.000000000 +1100
+++ perl-5.8.8/lib/Pod/Perldoc.pm	2006-02-02 23:38:49.000000000 +1100
@@ -1533,6 +1533,7 @@
     $self->{'target'} = (splitdir $s)[-1];  # XXX: why not use File::Basename?
     for ($i=0; $i<@dirs; $i++) {
 	$dir = $dirs[$i];
+	next unless -d $dir; # some dirs in @INC are optional
 	($dir = VMS::Filespec::unixpath($dir)) =~ s!/\z!! if IS_VMS;
 	if (       (! $self->opt_m && ( $ret = $self->check_file($dir,"$s.pod")))
 		or ( $ret = $self->check_file($dir,"$s.pm"))