Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the IO-All CPAN distribution.

Report information
The Basics
Id: 5686
Status: rejected
Priority: 0/
Queue: IO-All

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
Subject: why is BINMODE not on by default? (why is it a nullop)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 54
why is BINMODE not on by default? (why is it a nullop)
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 430
Download (untitled) / with headers
text/plain 430b
[guest - Tue Mar 16 14:31:00 2004]: Show quoted text
> why is BINMODE not on by default? (why is it a nullop)
Here is a test case that demonstrates the problem for Win32: #!/usr/bin/perl -w use strict; use File::Temp qw(tempfile); use Test::More tests => 2; use_ok( 'IO::All' ); my ($fh,$filename) = tempfile(); my $binary = "foo\r\nbar"; binmode $fh; print $fh $binary; close $fh; my $content = io($filename)->slurp; is($binary, $content);
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-14540-1390018427-1697.5686-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 685
Download (untitled) / with headers
text/plain 685b
On Sun Mar 21 08:57:59 2004, CORION wrote: Show quoted text
> [guest - Tue Mar 16 14:31:00 2004]: >
> > why is BINMODE not on by default? (why is it a nullop)
> > Here is a test case that demonstrates the problem for Win32: > > #!/usr/bin/perl -w > use strict; > use File::Temp qw(tempfile); > use Test::More tests => 2; > > use_ok( 'IO::All' ); > > my ($fh,$filename) = tempfile(); > > my $binary = "foo\r\nbar"; > binmode $fh; > print $fh $binary; > close $fh; > > my $content = io($filename)->slurp; > is($binary, $content);
This is because that's how perl works. For the vast majority of the time \r\n and \n are interchangeable. If you *do* want to care, you can turn on binary yourself.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.