Codebase list libcapture-tiny-perl / 1d04297
don't binmode utf8 on 5.6 David Golden 15 years ago
14 changed file(s) with 18 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
8686 _open $dup{stdin} = IO::Handle->new, "<&=STDIN";
8787 }
8888 $proxies{stdin} = \*STDIN;
89 binmode(STDIN, ':utf8');
89 binmode(STDIN, ':utf8') if $] >= 5.008;
9090 }
9191 if ( ! defined fileno STDOUT ) {
9292 $proxy_count{stdout}++;
100100 _open $dup{stdout} = IO::Handle->new, ">&=STDOUT";
101101 }
102102 $proxies{stdout} = \*STDOUT;
103 binmode(STDOUT, ':utf8');
103 binmode(STDIN, ':utf8') if $] >= 5.008;
104104 }
105105 if ( ! defined fileno STDERR ) {
106106 $proxy_count{stderr}++;
114114 _open $dup{stderr} = IO::Handle->new, ">&=STDERR";
115115 }
116116 $proxies{stderr} = \*STDERR;
117 binmode(STDERR, ':utf8');
117 binmode(STDIN, ':utf8') if $] >= 5.008;
118118 }
119119 return %proxies;
120120 }
1212 plan 'no_plan';
1313
1414 my $builder = Test::More->builder;
15 binmode($builder->failure_output, ':utf8');
15 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
1616
1717 my $fd = next_fd;
1818
1919 }
2020
2121 my $builder = Test::More->builder;
22 binmode($builder->failure_output, ':utf8');
22 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
2323
2424 my $fd = next_fd;
2525
1515 plan 'no_plan';
1616
1717 my $builder = Test::More->builder;
18 binmode($builder->failure_output, ':utf8');
18 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
1919
2020 save_std(qw/stdout/);
2121 ok( close STDOUT, "closed STDOUT" );
1515 plan 'no_plan';
1616
1717 my $builder = Test::More->builder;
18 binmode($builder->failure_output, ':utf8');
18 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
1919
2020 save_std(qw/stderr/);
2121 ok( close STDERR, "closed STDERR" );
1515 plan 'no_plan';
1616
1717 my $builder = Test::More->builder;
18 binmode($builder->failure_output, ':utf8');
18 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
1919
2020 save_std(qw/stdin/);
2121 ok( close STDIN, "closed STDIN" );
1313 plan tests => 4;
1414
1515 my $builder = Test::More->builder;
16 binmode($builder->failure_output, ':utf8');
16 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
1717
1818 my $fd = next_fd;
1919
1818 plan 'no_plan';
1919
2020 my $builder = Test::More->builder;
21 binmode($builder->failure_output, ':utf8');
21 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
2222
2323 save_std(qw/stdout/);
2424 ok( close STDOUT, "closed STDOUT" );
1818 plan 'no_plan';
1919
2020 my $builder = Test::More->builder;
21 binmode($builder->failure_output, ':utf8');
21 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
2222
2323 save_std(qw/stderr/);
2424 ok( close STDERR, "closed STDERR" );
1818 plan 'no_plan';
1919
2020 my $builder = Test::More->builder;
21 binmode($builder->failure_output, ':utf8');
21 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
2222
2323 #--------------------------------------------------------------------------#
2424
1919 plan 'no_plan';
2020
2121 my $builder = Test::More->builder;
22 binmode($builder->failure_output, ':utf8');
23 binmode($builder->todo_output, ':utf8');
22 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
23 binmode($builder->todo_output, ':utf8') if $] >= 5.008;
2424
2525 save_std(qw/stdout/);
2626 tie *STDOUT, 't::lib::TieLC', ">&=STDOUT";
1919 plan 'no_plan';
2020
2121 my $builder = Test::More->builder;
22 binmode($builder->failure_output, ':utf8');
23 binmode($builder->todo_output, ':utf8');
22 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
23 binmode($builder->todo_output, ':utf8') if $] >= 5.008;
2424
2525 save_std(qw/stderr/);
2626 tie *STDERR, 't::lib::TieLC', ">&=STDERR";
1919 plan 'no_plan';
2020
2121 my $builder = Test::More->builder;
22 binmode($builder->failure_output, ':utf8');
22 binmode($builder->failure_output, ':utf8') if $] >= 5.008;
2323
2424 save_std(qw/stdin/);
2525 tie *STDIN, 't::lib::TieLC', ">&=STDIN";
3030 my $t = shift;
3131 return unless $t eq 'unicode';
3232 my %seen;
33 my @orig_layers = grep {$_ ne 'unix' and $_ ne 'perlio' and $seen{$_}++} PerlIO::get_layers(STDOUT);
33 my @orig_layers = grep {$_ ne 'unix' and $_ ne 'perlio' and $seen{$_}++} PerlIO::get_layers(\*STDOUT);
3434 binmode(STDOUT, ":utf8") if fileno(STDOUT);
3535 binmode(STDERR, ":utf8") if fileno(STDERR);
3636 return @orig_layers;