On 01/06/2012 02:02 PM, Alex Hunsaker wrote:
>> 3. The above is in any case almost certainly insufficient, because in my
>> tests a typeglob didn't trigger SvREADONLY(), but did cause a crash.
> Hrm the glob I was testing was *STDIN. It failed to fail in my test
> program because I was not testing *STDIN directly but instead had
> @test = (*STDIN); Ugh. Playing with it a bit more it seems only
> *STDIN, *STDERR and *STDOUT have problems. For example this seems to
> work fine for me:
> do LANGUAGE plperlu $$ open(my $fh, '>', '/tmp/t.tmp'); elog(NOTICE, $fh) $$;
>
>
$fh isn't a typeglob here, AIUI. But it's definitely not just *STDIN and
friends. Try:
do LANGUAGE plperlu $$ $foo=1; elog(NOTICE, *foo) $$;
cheers
andrew