Aristotle Pagaltzis wrote:
use 5.008;
use strict;
use warnings;
  use open ':std', ':locale';
use Test::More tests => 1;

my $uni = "\x{11e}";

ok( $uni eq $uni, "Testing $uni" );

__END__
1..1
Wide character in print at lib/Test/Builder.pm line 1252.
  ^^^^^^ after the above patch, gone

There's the rub, it doesn't go away.

Test::Builder dups STDERR and STDOUT, this is so you can mess with them to your heart's content and still get testing done. File I/O disciplines don't appear to be copied across dups. That's what everyone was complaining about, that they had to manually apply layers to Test::Builder's own handles.

It appears I have to manually copy the layers across, ok.

sub _copy_io_layers {
    my($self, $src, $dest) = @_;

    $self->_try(sub {
        require PerlIO;
        my @layers = PerlIO::get_layers($src);

        binmode $dest, join " ", map ":$_", @layers if @layers;
    });
}

That does it.  Thank you for playing software confessional. :)


--
The past has a vote, but not a veto.
    -- Mordecai M. Kaplan

Reply via email to