Skip Menu |
 

This queue is for tickets about the File-Slurp CPAN distribution.

Report information
The Basics
Id: 34444
Status: resolved
Priority: 0/
Queue: File-Slurp

People
Owner: Nobody in particular
Requestors: NKH [...] cpan.org
Cc:
AdminCc:

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



Subject: binmode only accepts ':raw'
Download (untitled) / with headers
text/plain 251b
As described in the documentation: my $bin_data = read_file( $bin_file, binmode => ':raw' ) ; NOTE: this actually sets the O_BINARY mode flag for sysopen. It probably should call binmode and pass its argument to support other file modes.
Download (untitled) / with headers
text/plain 773b
On Wed Mar 26 10:52:31 2008, NKH wrote: Show quoted text
> As described in the documentation: > > my $bin_data = read_file( $bin_file, binmode => ':raw' ) ; > NOTE: this actually sets the O_BINARY mode flag for sysopen. It > probably should call binmode and pass its argument to support other > file modes. > >
Add me to that too. I would love to use File::Slurp but as all my files are utf8 encoded I would need to do the decoding afterwards. Obviously I can do that myself afterwards but not without a reassignment (unless I use scalar_ref => 1 attribute). BTW, I would not just set the ":utf-8" flag because horrible things will happen if it is not utf-8 encoded - use ":encoding(UTF-8)" which checks the utf-8 encoding is correct. Martin -- Martin J. Evans Wetherby, UK
Download (untitled) / with headers
text/plain 410b
On Tue Jun 30 12:06:00 2009, MJEVANS wrote Show quoted text
> Add me to that too. I would love to use File::Slurp but as all my files > are utf8 encoded I would need to do the decoding afterwards.
Please add me as another requestor. I think the binmode flag should be passed on to the open(). I end up doing something myself like open my $fh, '>:encoding(UTF-8)', $filepath or die "$filepath: $!"; Regards, Peter
Download (untitled) / with headers
text/plain 137b
I'd love to see this fixed. There's even a patch down there (although it's 3 years old): http://rt.cpan.org/Ticket/Display.html?id=28491
From: bryce2 [...] obviously.com
Download (untitled) / with headers
text/plain 238b
Ironically the documented { atomic => 1, binmode => ':raw' } will give "wide character" error in syswrite(). The undocumented { atomic => 1, binmode => ':utf8' } works differently, perhaps even correctly. This module feels "abandoned".
Download (untitled) / with headers
text/plain 194b
Show quoted text
> This module feels "abandoned".
the whole purpose why I am using this module - is to have a "standard" way to get/put a file contents in one go. too bad this is not correctly working for utf8
Subject: Re: [rt.cpan.org #34444] binmode only accepts ':raw'
Date: Fri, 18 Feb 2011 15:11:22 -0500
To: bug-File-Slurp [...] rt.cpan.org
From: "Uri Guttman" <uri [...] StemSystems.com>
Download (untitled) / with headers
text/plain 595b
hi all slurp bug reporters, a new version of File::Slurp is on the way. it supports utf8 in binmode and many other fixes and new features. i am in the last stages of testing and will have a beta release very soon. if you want to test the beta, email me directly at uri@stemsystems.com and let me know. mention file::slurp in the email body. thanx, uri -- Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------


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.