develooper Front page | perl.perl5.porters | Postings from February 2006

emergent (FAKE) typeglob behaviour

Thread Next
From:
Nicholas Clark
Date:
February 24, 2006 15:01
Subject:
emergent (FAKE) typeglob behaviour
Message ID:
20060224230135.GK616@plum.flirble.org
Look the other way while I don't show you this:

$ cat ~/p4perl/perl/globness.pl
my $a = *foo;
my $b = *foo;

'' . $a;
$a .= <DATA>;

print $a;

$b .= <DATA>;

print $b;

__DATA__
Glob was coerced to a string so this will be appended.
Glob was not coerced so this will overwrite

$ ./perl ~/p4perl/perl/globness.pl
*main::fooGlob was coerced to a string so this will be appended.
Glob was not coerced so this will overwrite
$ 


Can we pretend you didn't see that? I'd quite like to make changes without
guaranteeing that somewhat wacky bit of emergent behaviour. (For 5.9.x)

Nicholas Clark

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About