summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-07-05 14:24:19 -0400
committerGurusamy Sarathy <gsar@cpan.org>1999-07-07 18:41:07 +0000
commitfe7ac86adc7dbfe34590b2596930effe07cb024b (patch)
treee53ba1c9bdb9b34c50b2a7aa0230350d216474c1 /t
parente50990e1101efe5e60cb533da47cd00524dea150 (diff)
downloadperl-fe7ac86adc7dbfe34590b2596930effe07cb024b.tar.gz
Re: [ID 19990705.001] Overloading boolean conversion
Message-Id: <199907052224.SAA10454@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@3652
Diffstat (limited to 't')
-rwxr-xr-xt/pragma/overload.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/t/pragma/overload.t b/t/pragma/overload.t
index 7fd0196d4a..ff8d8059f1 100755
--- a/t/pragma/overload.t
+++ b/t/pragma/overload.t
@@ -899,5 +899,22 @@ test $bar->{two}, 11; # 205
$bar->{three} = 13;
test $bar->[3], 13; # 206
+{
+ package B;
+ use overload bool => sub { ${+shift} };
+}
+
+my $aaa;
+{ my $bbbb = 0; $aaa = bless \$bbbb, B }
+
+test !$aaa, 1;
+
+unless ($aaa) {
+ test 'ok', 'ok';
+} else {
+ test 'is not', 'ok';
+}
+
+
# Last test is:
-sub last {206}
+sub last {208}