From: Paul Marquess Date: Wed, 12 Oct 2005 22:41:41 +0000 (+0100) Subject: RE: [PATCH] Compress::Zlib X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e28d6a375c38eec68bc723dfb433ed749cccd63;p=p5sagit%2Fp5-mst-13.2.git RE: [PATCH] Compress::Zlib From: "Paul Marquess" Message-ID: <004c01c5cf75$bd368fc0$0e1c140a@myopwv.com> p4raw-id: //depot/perl@25744 --- diff --git a/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm b/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm index 4f5ea61..615bd08 100644 --- a/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm +++ b/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm @@ -27,43 +27,18 @@ sub setBinModeInput($) { my $handle = shift ; - binmode $handle unless $^O eq 'MSWin32' ; - #binmode $handle if $] == 5.008 ; - #binmode $handle unless isSTDIN($handle) ; + binmode $handle + unless $^O eq 'MSWin32' && ! ( ${^UNICODE} || ${^UTF8LOCALE} ); } sub setBinModeOutput($) { my $handle = shift ; - #binmode $handle if $] == 5.008; - #binmode $handle unless isSTDOUT($handle) ; + binmode $handle + unless $^O eq 'MSWin32' && ! ( ${^UNICODE} || ${^UTF8LOCALE} ); } -#sub isSTDIO($) -#{ -# my $handle = shift ; -# -# return 0 unless isaFilehandle($handle); -# return fileno $handle == fileno STDIN || fileno $handle == fileno STDOUT; -#} -# -#sub isSTDIN($) -#{ -# my $handle = shift ; -# -# return 0 unless isaFilehandle($handle); -# return fileno $handle == fileno STDIN; -#} -# -#sub isSTDOUT($) -#{ -# my $handle = shift ; -# -# return 0 unless isaFilehandle($handle); -# return fileno $handle == fileno STDOUT; -#} - sub isaFilehandle($) { use utf8; # Pragma needed to keep Perl 5.6.0 happy @@ -199,29 +174,6 @@ sub ckOutputParam ($$$) return 1; } -#sub ckInOutParams($$$$) -#{ -# my $from = shift ; -# -# ckInputParam($from, $_[0], $_[2]) -# or return undef ; -# ckOutputParam($from, $_[1], $_[2]) -# or return undef ; -# -# my $inType = whatIs($_[0]); -# my $outType = whatIs($_[1]); -# -# # Check that input != output -# if ($inType eq $outType && $_[0] eq $_[1]) -# { -# local $Carp::CarpLevel = 1; -# croak("$from: input and output $inType are identical"); -# } -# -# return 1; -#} - - sub Validator::new { my $class = shift ;