diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-18 10:58:19 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-18 10:58:19 -0800 |
commit | 3ba1b8ed82fe257746e3def5dd9b3a8d7dbdc1bd (patch) | |
tree | afae09a15cbb91c06d3bf7205f9756f741bfb249 /lib | |
parent | ca6102577e2112f9ab35a6504913f9234b4e8af7 (diff) | |
download | perl-3ba1b8ed82fe257746e3def5dd9b3a8d7dbdc1bd.tar.gz |
overloading.pm: Load Carp on demand
Diffstat (limited to 'lib')
-rw-r--r-- | lib/overloading.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/overloading.pm b/lib/overloading.pm index d1ca5664b6..a10858c12b 100644 --- a/lib/overloading.pm +++ b/lib/overloading.pm @@ -1,8 +1,6 @@ package overloading; use warnings; -use Carp (); - our $VERSION = '0.01'; my $HINT_NO_AMAGIC = 0x01000000; # see perl.h @@ -14,7 +12,7 @@ sub _ops_to_nums { map { exists $overload::numbers::names{"($_"} ? $overload::numbers::names{"($_"} - : Carp::croak("'$_' is not a valid overload") + : do { require Carp; Carp::croak("'$_' is not a valid overload") } } @_; } |