This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Close the filehandle actually being tested in uni/readline.t
[perl5.git] / lib / overloading.pm
index d1ca566..c762227 100644 (file)
@@ -1,9 +1,7 @@
 package overloading;
 use warnings;
 
-use Carp ();
-
-our $VERSION = '0.01';
+our $VERSION = '0.02';
 
 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") }
     } @_;
 }