This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca61025
)
overloading.pm: Load Carp on demand
author
Father Chrysostomos
<sprout@cpan.org>
Wed, 18 Jan 2012 18:58:19 +0000
(10:58 -0800)
committer
Father Chrysostomos
<sprout@cpan.org>
Wed, 18 Jan 2012 18:58:19 +0000
(10:58 -0800)
lib/overloading.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/overloading.pm
b/lib/overloading.pm
index
d1ca566
..
a10858c
100644
(file)
--- 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") }
} @_;
}