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
|
Description: Architecture independent patch for CPAN bug #83994
Author: Christopher Hoskin <christopher.hoskin@gmail.com>
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=83994
Last-Update: 2016-09-23
--- a/inst/netsymbols.pl
+++ b/inst/netsymbols.pl
@@ -147,8 +147,20 @@
return if $slurped{$in};
$slurped{$in} = 1;
local *F;
- my $file = ($sw) ?
- $in : $Config{usrinc} .'/'. $in;
+ my $file;
+ if ($sw) {
+ $file = $in;
+ } else {
+ my $incpth = $Config{incpth};
+ while ($incpth =~ /(\S+)/g) {
+ my $path=$1 .'/'. $in;
+ if (-e $path) {
+ $file=$path;
+ last;
+ }
+ }
+ return unless ($file);
+ }
open (F,$file) or return;
my @new = <F>;
close F;
|