From 6286f723a70d9d63bf59e611a2946140879179c3 Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Tue, 3 Sep 2002 10:21:57 -0700 Subject: File::Basename doesn't lazy load Carp right. and Subject: [PATCH] More modules that don't lazy load Carp right. Message-ID: <20020904002157.GD2701@ool-18b93024.dyn.optonline.net> and Message-ID: <20020904003857.GE2701@ool-18b93024.dyn.optonline.net> p4raw-id: //depot/perl@17840 --- ext/Encode/Unicode/Unicode.pm | 4 ++-- ext/Encode/lib/Encode/Encoding.pm | 4 ++-- ext/Sys/Hostname/Hostname.pm | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'ext') diff --git a/ext/Encode/Unicode/Unicode.pm b/ext/Encode/Unicode/Unicode.pm index fa508ebb7b..b09e126d07 100644 --- a/ext/Encode/Unicode/Unicode.pm +++ b/ext/Encode/Unicode/Unicode.pm @@ -60,7 +60,7 @@ sub set_transcoder{ *encode = \&encode_classic; }else{ require Carp; - Carp::croak __PACKAGE__, "::set_transcoder(modern|classic|xs)"; + Carp::croak(__PACKAGE__, "::set_transcoder(modern|classic|xs)"); } } @@ -258,7 +258,7 @@ sub poisoned2death{ my $msg = shift; my $pair = join(", ", map {sprintf "\\x%x", $_} @_); require Carp; - Carp::croak $obj->name, ":", $msg, "<$pair>.", caller; + Carp::croak($obj->name, ":", $msg, "<$pair>.", caller); } 1; diff --git a/ext/Encode/lib/Encode/Encoding.pm b/ext/Encode/lib/Encode/Encoding.pm index 1876cb73ad..1d24e9ce88 100644 --- a/ext/Encode/lib/Encode/Encoding.pm +++ b/ext/Encode/lib/Encode/Encoding.pm @@ -36,14 +36,14 @@ sub encode { require Carp; my $obj = shift; my $class = ref($obj) ? ref($obj) : $obj; - Carp::croak $class, "->encode() not defined!"; + Carp::croak($class, "->encode() not defined!"); } sub decode{ require Carp; my $obj = shift; my $class = ref($obj) ? ref($obj) : $obj; - Carp::croak $class, "->encode() not defined!"; + Carp::croak($class, "->encode() not defined!"); } sub DESTROY {} diff --git a/ext/Sys/Hostname/Hostname.pm b/ext/Sys/Hostname/Hostname.pm index 1efc897c3b..29825b95b0 100644 --- a/ext/Sys/Hostname/Hostname.pm +++ b/ext/Sys/Hostname/Hostname.pm @@ -47,7 +47,7 @@ sub hostname { # rats! $host = ''; - Carp::croak "Cannot get host name of local machine"; + croak "Cannot get host name of local machine"; } elsif ($^O eq 'MSWin32') { @@ -110,7 +110,7 @@ sub hostname { } # bummer - || Carp::croak "Cannot get host name of local machine"; + || croak "Cannot get host name of local machine"; # remove garbage $host =~ tr/\0\r\n//d; -- cgit v1.2.1