summaryrefslogtreecommitdiff
path: root/lib/overload.t
diff options
context:
space:
mode:
authorJohn Peacock <jpeacock@rowman.com>2002-02-24 11:40:07 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-24 23:33:33 +0000
commit6050d10e6008e3d6e86de76c85d93bf5c06336aa (patch)
tree22abf8721e11d3eb865e04fca86b40c8137fae35 /lib/overload.t
parent4a623e436d71abaaa4d1ebda0aec183af7a6eb53 (diff)
downloadperl-6050d10e6008e3d6e86de76c85d93bf5c06336aa.tar.gz
Re: Copying PV only with possible UTF-8 characters
Message-ID: <3C795DB7.40105@rowman.com> p4raw-id: //depot/perl@14857
Diffstat (limited to 'lib/overload.t')
-rw-r--r--lib/overload.t22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/overload.t b/lib/overload.t
index d07506261d..cf49eac45a 100644
--- a/lib/overload.t
+++ b/lib/overload.t
@@ -1046,5 +1046,25 @@ $r = Foo->new(0);
test(($r || 0) == 0); # 222
+package utf8_o;
+
+use overload
+ '""' => sub { return $_[0]->{var}; }
+ ;
+
+sub new
+ {
+ my $class = shift;
+ my $self = {};
+ $self->{var} = shift;
+ bless $self,$class;
+ }
+
+package main;
+
+
+my $utfvar = new utf8_o 200.2.1;
+test("$utfvar" eq 200.2.1); # 223
+
# Last test is:
-sub last {222}
+sub last {223}