From: Richard Clamp Date: Tue, 21 Oct 2003 00:02:49 +0000 (+0100) Subject: Re: [perl #948] $, untieable? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c0731c3784186294017516545e3530192f2be03;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/t/TEST b/t/TEST index 08787e2..7ff34b2 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 f30f693..22be612 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