summaryrefslogtreecommitdiff
path: root/dist/bignum/lib
diff options
context:
space:
mode:
authorOlivier Mengué <dolmen@cpan.org>2014-09-05 00:17:23 +0200
committerFather Chrysostomos <sprout@cpan.org>2014-09-04 18:09:01 -0700
commit02b92a2210d0958ba3e8e5a43ad5337fb5bf16f3 (patch)
tree64a874d9ead3437ead6542191ce6abdf36a38a72 /dist/bignum/lib
parent6347c79c0486278eba1f54cf5fffff03b907884f (diff)
downloadperl-02b92a2210d0958ba3e8e5a43ad5337fb5bf16f3.tar.gz
big{num,rat,int}: use eval block to load Math::BigInt::Lite
Diffstat (limited to 'dist/bignum/lib')
-rw-r--r--dist/bignum/lib/bigint.pm3
-rw-r--r--dist/bignum/lib/bignum.pm3
-rw-r--r--dist/bignum/lib/bigrat.pm3
3 files changed, 3 insertions, 6 deletions
diff --git a/dist/bignum/lib/bigint.pm b/dist/bignum/lib/bigint.pm
index 993ea9112f..7a664ac063 100644
--- a/dist/bignum/lib/bigint.pm
+++ b/dist/bignum/lib/bigint.pm
@@ -248,8 +248,7 @@ sub import
# see if we can find Math::BigInt::Lite
if (!defined $a && !defined $p) # rounding won't work to well
{
- eval 'require Math::BigInt::Lite;';
- if ($@ eq '')
+ if (eval { require Math::BigInt::Lite; 1 })
{
@import = ( ); # :constant in Lite, not MBI
Math::BigInt::Lite->import( ':constant' );
diff --git a/dist/bignum/lib/bignum.pm b/dist/bignum/lib/bignum.pm
index 40aedceca7..9a3389f17c 100644
--- a/dist/bignum/lib/bignum.pm
+++ b/dist/bignum/lib/bignum.pm
@@ -155,8 +155,7 @@ sub import
# see if we can find Math::BigInt::Lite
if (!defined $a && !defined $p) # rounding won't work to well
{
- eval 'require Math::BigInt::Lite;';
- if ($@ eq '')
+ if (eval { require Math::BigInt::Lite; 1 })
{
@import = ( ); # :constant in Lite, not MBI
Math::BigInt::Lite->import( ':constant' );
diff --git a/dist/bignum/lib/bigrat.pm b/dist/bignum/lib/bigrat.pm
index adbeff4dba..93660a458a 100644
--- a/dist/bignum/lib/bigrat.pm
+++ b/dist/bignum/lib/bigrat.pm
@@ -148,8 +148,7 @@ sub import
# see if we can find Math::BigInt::Lite
if (!defined $a && !defined $p) # rounding won't work to well
{
- eval 'require Math::BigInt::Lite;';
- if ($@ eq '')
+ if (eval { require Math::BigInt::Lite; 1 })
{
@import = ( ); # :constant in Lite, not MBI
Math::BigInt::Lite->import( ':constant' );