Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Path-Class CPAN distribution.

Maintainer(s)' notes

I prefer that bugs & patches are filed on GitHub rather than on RT: https://github.com/kenahoo/Path-Class/issues. Thanks.

Report information
The Basics
Id: 52957
Status: resolved
Priority: 0/
Queue: Path-Class

People
Owner: Nobody in particular
Requestors: kyo [...] hail2u.net
Cc:
AdminCc:

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



Subject: add 'binmode' option to slurp() method
I wish to slurp a binary file (such as PNG image) like this: use Path::Class; my $png = file('foo.png'); my $content = $png->slurp(binmode => 1); Instead of: use Path::Class; my $png = file('foo.png'); my $fh = $file->openr(); $fh->binmode(); local $/; my $content = <$fh>; I think it is useful on Windows.
I think that is the solution you are looking for. use Path::Class; my $png = file('foo.png'); my $content = $png->slurp(iomode => '<:raw');