summaryrefslogtreecommitdiff
path: root/cpan/bignum
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-06-27 16:21:21 +1000
committerTony Cook <tony@develop-help.com>2016-07-26 15:36:32 +1000
commitb8097e9479a0aafd1182244c6f9a955c57fb6b1a (patch)
treeb2972f3519bf10c282667607773c03c05e443583 /cpan/bignum
parent38b4af19a42e6a4b9d5c8cc97fd06d954fff69a8 (diff)
downloadperl-b8097e9479a0aafd1182244c6f9a955c57fb6b1a.tar.gz
cpan/: remove . from @INC when loading optional modules
Diffstat (limited to 'cpan/bignum')
-rw-r--r--cpan/bignum/lib/bigint.pm2
-rw-r--r--cpan/bignum/lib/bignum.pm2
-rw-r--r--cpan/bignum/lib/bigrat.pm2
3 files changed, 6 insertions, 0 deletions
diff --git a/cpan/bignum/lib/bigint.pm b/cpan/bignum/lib/bigint.pm
index fa30eb8122..c03e096652 100644
--- a/cpan/bignum/lib/bigint.pm
+++ b/cpan/bignum/lib/bigint.pm
@@ -315,6 +315,8 @@ sub import {
} else {
# see if we can find Math::BigInt::Lite
if (!defined $a && !defined $p) { # rounding won't work to well
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
if (eval { require Math::BigInt::Lite; 1 }) {
@import = (); # :constant in Lite, not MBI
Math::BigInt::Lite->import(':constant');
diff --git a/cpan/bignum/lib/bignum.pm b/cpan/bignum/lib/bignum.pm
index bf2881eb90..89cf0afda1 100644
--- a/cpan/bignum/lib/bignum.pm
+++ b/cpan/bignum/lib/bignum.pm
@@ -157,6 +157,8 @@ sub import {
else {
# see if we can find Math::BigInt::Lite
if (!defined $a && !defined $p) { # rounding won't work to well
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
if (eval { require Math::BigInt::Lite; 1 }) {
@import = (); # :constant in Lite, not MBI
Math::BigInt::Lite->import(':constant');
diff --git a/cpan/bignum/lib/bigrat.pm b/cpan/bignum/lib/bigrat.pm
index 8557fc965a..e1032b6a37 100644
--- a/cpan/bignum/lib/bigrat.pm
+++ b/cpan/bignum/lib/bigrat.pm
@@ -150,6 +150,8 @@ sub import {
else {
# see if we can find Math::BigInt::Lite
if (!defined $a && !defined $p) { # rounding won't work to well
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
if (eval { require Math::BigInt::Lite; 1 }) {
@import = (); # :constant in Lite, not MBI
Math::BigInt::Lite->import(':constant');