develooper Front page | perl.perl5.porters | Postings from March 2011

Re: serious PerlIO trouble :(

Thread Previous | Thread Next
From:
David Leadbeater
Date:
March 12, 2011 03:35
Subject:
Re: serious PerlIO trouble :(
Message ID:
1014020F-C659-4B00-8626-1603D26D3F33@dgl.cx
On 12 Mar 2011, at 10:09, H.Merijn Brand wrote
[...]
>> Presumably because the open pragma isn't applying inside IO::Handle
> 
> Should it? Should I file an RT?

IMHO it should, considering how IO::Handle is part of the core and is used transparently (even more so now IO::File will be loaded on demand without an explicit use). 

A very similar issue applies to the autodie pragma (binmode just a random example here, not limited to that):

  $ bleadperl -Mautodie -e'STDIN->binmode(":x")'
  [you do get a warning here if you turn on warnings, else nothing.]
  $ bleadperl -Mautodie -e'binmode STDIN, ":x"' 
  Unknown PerlIO layer "x" at (eval 31) line 67.
  Can't binmode('STDIN', ':x'): No such file or directory at -e line 1

Not sure if there's an RT for that already? (I see http://rt.cpan.org/Public/Bug/Display.html?id=54777, but that's a pragma related issue, but not quite the same thing).
Thread Previous | 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