projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73cb726
)
utf.pm needs to require Carp before croak()ing
author
Nicholas Clark
<nick@ccl4.org>
Thu, 13 Jan 2005 13:50:40 +0000
(13:50 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Thu, 13 Jan 2005 13:50:40 +0000
(13:50 +0000)
p4raw-id: //depot/perl@23788
lib/utf8.pm
patch
|
blob
|
history
lib/utf8.t
patch
|
blob
|
history
diff --git
a/lib/utf8.pm
b/lib/utf8.pm
index
817a61c
..
e0b9f85
100644
(file)
--- a/
lib/utf8.pm
+++ b/
lib/utf8.pm
@@
-16,6
+16,7
@@
sub unimport {
sub AUTOLOAD {
require "utf8_heavy.pl";
goto &$AUTOLOAD if defined &$AUTOLOAD;
+ require Carp;
Carp::croak("Undefined subroutine $AUTOLOAD called");
}
diff --git
a/lib/utf8.t
b/lib/utf8.t
index
576d90e
..
70ef1e3
100644
(file)
--- a/
lib/utf8.t
+++ b/
lib/utf8.t
@@
-37,7
+37,7
@@
no utf8; # Ironic, no?
#
#
-plan tests => 14
5
;
+plan tests => 14
6
;
{
# bug id 20001009.001
@@
-425,3
+425,9
@@
SKIP: {
utf8::upgrade($b);
is($b, $a, "utf8::upgrade OffsetOK");
}
+
+{
+ fresh_perl_like ('use utf8; utf8::moo()',
+ qr/Undefined subroutine utf8::moo/, {stderr=>1},
+ "Check Carp is loaded for AUTOLOADing errors")
+}