summaryrefslogtreecommitdiff
path: root/dist/bignum/lib
diff options
context:
space:
mode:
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' );