Change 17840 by [EMAIL PROTECTED] on 2002/09/04 13:55:20
Subject: [PATCH] File::Basename doesn't lazy load Carp right.
and Subject: [PATCH] More modules that don't lazy load Carp right.
From: Michael G Schwern <[EMAIL PROTECTED]>
Date: Tue, 3 Sep 2002 17:21:57 -0700
Message-ID: <[EMAIL PROTECTED]>
and Message-ID: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/ext/Encode/Unicode/Unicode.pm#6 edit
.... //depot/perl/ext/Encode/lib/Encode/Encoding.pm#16 edit
.... //depot/perl/ext/Sys/Hostname/Hostname.pm#2 edit
.... //depot/perl/lib/File/Basename.pm#31 edit
Differences ...
==== //depot/perl/ext/Encode/Unicode/Unicode.pm#6 (text) ====
Index: perl/ext/Encode/Unicode/Unicode.pm
--- perl/ext/Encode/Unicode/Unicode.pm#5~16392~ Sat May 4 08:58:53 2002
+++ perl/ext/Encode/Unicode/Unicode.pm Wed Sep 4 06:55:20 2002
@@ -60,7 +60,7 @@
*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 @@
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;
==== //depot/perl/ext/Encode/lib/Encode/Encoding.pm#16 (text) ====
Index: perl/ext/Encode/lib/Encode/Encoding.pm
--- perl/ext/Encode/lib/Encode/Encoding.pm#15~16426~ Mon May 6 02:48:42 2002
+++ perl/ext/Encode/lib/Encode/Encoding.pm Wed Sep 4 06:55:20 2002
@@ -36,14 +36,14 @@
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 {}
==== //depot/perl/ext/Sys/Hostname/Hostname.pm#2 (text) ====
Index: perl/ext/Sys/Hostname/Hostname.pm
--- perl/ext/Sys/Hostname/Hostname.pm#1~5110~ Tue Feb 15 11:32:56 2000
+++ perl/ext/Sys/Hostname/Hostname.pm Wed Sep 4 06:55:20 2002
@@ -47,7 +47,7 @@
# 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 @@
}
# 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;
==== //depot/perl/lib/File/Basename.pm#31 (text) ====
Index: perl/lib/File/Basename.pm
--- perl/lib/File/Basename.pm#30~17423~ Mon Jul 8 12:10:29 2002
+++ perl/lib/File/Basename.pm Wed Sep 4 06:55:20 2002
@@ -169,7 +169,7 @@
my($fullname,@suffices) = @_;
unless (defined $fullname) {
require Carp;
- Carp::croak "fileparse(): need a valid pathname";
+ Carp::croak("fileparse(): need a valid pathname");
}
my($fstype,$igncase) = ($Fileparse_fstype, $Fileparse_igncase);
my($dirpath,$tail,$suffix,$basename);
End of Patch.