From 6c0731c3784186294017516545e3530192f2be03 Mon Sep 17 00:00:00 2001 From: Richard Clamp Date: Tue, 21 Oct 2003 01:02:49 +0100 Subject: 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 --- t/TEST | 2 +- t/op/tie.t | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 't') 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 -- cgit v1.2.1