1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
Subject: Tweak enc2xs to follow symlinks and ignore missing @INC directories.
Bug-Debian: http://bugs.debian.org/290336
- ignore missing directories,
- follow symlinks (/usr/share/perl/5.8 -> 5.8.4).
---
ext/Encode/bin/enc2xs | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ext/Encode/bin/enc2xs b/ext/Encode/bin/enc2xs
index 233ca54..502baec 100644
--- a/ext/Encode/bin/enc2xs
+++ b/ext/Encode/bin/enc2xs
@@ -924,11 +924,11 @@ use vars qw(
sub find_e2x{
eval { require File::Find; };
my (@inc, %e2x_dir);
- for my $inc (@INC){
+ for my $inc (grep -d, @INC){
push @inc, $inc unless $inc eq '.'; #skip current dir
}
File::Find::find(
- sub {
+ { wanted => sub {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= lstat($_) or return;
@@ -938,7 +938,7 @@ sub find_e2x{
$e2x_dir{$File::Find::dir} ||= $mtime;
}
return;
- }, @inc);
+ }, follow => 1}, @inc);
warn join("\n", keys %e2x_dir), "\n";
for my $d (sort {$e2x_dir{$a} <=> $e2x_dir{$b}} keys %e2x_dir){
$_E2X = $d;
@@ -1005,7 +1005,7 @@ sub make_configlocal_pm {
$LocalMod{$enc} ||= $mod;
}
};
- File::Find::find({wanted => $wanted}, @INC);
+ File::Find::find({wanted => $wanted, follow => 1}, grep -d, @INC);
$_ModLines = "";
for my $enc ( sort keys %LocalMod ) {
$_ModLines .=
--
tg: (daf8b46..) debian/enc2xs_inc (depends on: upstream)
|