summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRichard Clamp <richardc@unixbeard.net>2003-10-21 01:02:49 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-10-25 10:03:18 +0000
commit6c0731c3784186294017516545e3530192f2be03 (patch)
tree3624c75319d86a572e8665839276266311d2f307 /t
parent1624910aabf320d4a6e736454c7836595738ff84 (diff)
downloadperl-6c0731c3784186294017516545e3530192f2be03.tar.gz
Re: [perl #948] $, untieable?
Message-ID: <20031020230249.GA31123@mirth.demon.co.uk> Plus a small fix to t/TEST to recognize the added TODO test as a TODO test. p4raw-id: //depot/perl@21532
Diffstat (limited to 't')
-rwxr-xr-xt/TEST2
-rwxr-xr-xt/op/tie.t31
2 files changed, 32 insertions, 1 deletions
diff --git a/t/TEST b/t/TEST
index 08787e2f5b..7ff34b2a7c 100755
--- a/t/TEST
+++ b/t/TEST
@@ -353,7 +353,7 @@ EOT
$seen_ok = 1;
if ($2 == $next) {
my($not, $num, $extra) = ($1, $2, $3);
- my($istodo) = $extra =~ /^\s*#\s*TODO/ if $extra;
+ my($istodo) = $extra =~ /#\s*TODO/ if $extra;
$istodo = 1 if $todo{$num};
if( $not && !$istodo ) {
diff --git a/t/op/tie.t b/t/op/tie.t
index f30f69336d..22be612684 100755
--- a/t/op/tie.t
+++ b/t/op/tie.t
@@ -446,3 +446,34 @@ sub FETCH
}
EXPECT
ok
+########
+
+# TODO [perl #948] cannot meaningfully tie $,
+package TieDollarComma;
+
+sub TIESCALAR {
+ my $pkg = shift;
+ return bless \my $x, $pkg;
+}
+
+sub STORE {
+ my $self = shift;
+ $$self = shift;
+ print "STORE set '$$self'\n";
+}
+
+sub FETCH {
+ my $self = shift;
+ print "FETCH\n";
+ return $$self;
+}
+package main;
+
+tie $,, 'TieDollarComma';
+$, = 'BOBBINS';
+print "join", "things", "up\n";
+EXPECT
+STORE set 'BOBBINS'
+FETCH
+FETCH
+joinBOBBINSthingsBOBBINSup