diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 2005-10-12 23:41:41 +0100 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2005-10-13 06:10:27 +0000 |
commit | 0e28d6a375c38eec68bc723dfb433ed749cccd63 (patch) | |
tree | 9e3a4634335be1e19b653cef36769265254da14c /ext/Compress/Zlib | |
parent | e62b30224b43a0d71b586edde9c56a1f433e23cd (diff) | |
download | perl-0e28d6a375c38eec68bc723dfb433ed749cccd63.tar.gz |
RE: [PATCH] Compress::Zlib
From: "Paul Marquess" <Paul.Marquess@ntlworld.com>
Message-ID: <004c01c5cf75$bd368fc0$0e1c140a@myopwv.com>
p4raw-id: //depot/perl@25744
Diffstat (limited to 'ext/Compress/Zlib')
-rw-r--r-- | ext/Compress/Zlib/lib/Compress/Zlib/Common.pm | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm b/ext/Compress/Zlib/lib/Compress/Zlib/Common.pm index 4f5ea61b03..615bd086e0 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 ; |