diff options
Diffstat (limited to 'dist/Net-Ping/lib/Net/Ping.pm')
-rw-r--r-- | dist/Net-Ping/lib/Net/Ping.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dist/Net-Ping/lib/Net/Ping.pm b/dist/Net-Ping/lib/Net/Ping.pm index 2766c9edbb..c9cbd27356 100644 --- a/dist/Net-Ping/lib/Net/Ping.pm +++ b/dist/Net-Ping/lib/Net/Ping.pm @@ -410,7 +410,11 @@ sub ping_external { $timeout # Seconds after which ping times out ) = @_; - eval { require Net::Ping::External; } + eval { + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; + require Net::Ping::External; + } or croak('Protocol "external" not supported on your system: Net::Ping::External not found'); return Net::Ping::External::ping(ip => $ip, timeout => $timeout); } |