develooper Front page | perl.perl5.porters | Postings from November 2017

[perl #132475] [PATCH] Tie::StdHandle::BINMODE does not handle LAYERargument

Thread Previous
Hauke D
November 20, 2017 15:31
[perl #132475] [PATCH] Tie::StdHandle::BINMODE does not handle LAYERargument
Message ID:
# New Ticket Created by  Hauke D 
# Please include the string:  [perl #132475]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Dear Perl 5 Porters,

The final test in the attached script always fails (tested on Linux, 
Perl 5.8.1 thru blead, and Windows on several Perl versions). The reason 
is that Tie::StdHandle::BINMODE is implemented like this:

  sub BINMODE { binmode($_[0]) }

meaning that the layer argument is not passed through. The attached 
patch fixes this (tests included) by changing the implementation to:

  sub BINMODE { &CORE::binmode(shift, @_) }

This is based on the first of the patches that I wrote about a while ago 
here (this time submitted as a bug for tracking):

Thanks, Best Regards,
-- Hauke D

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About