kenahoo / Path-Class

Cross-platform path specification manipulation
http://search.cpan.org/dist/Path-Class/
15 stars 28 forks source link

Add 'split' parameter to 'slurp'. #14

Closed yanick closed 11 years ago

yanick commented 11 years ago

So that slurp can mimick the command-line '-a' option, like such:

my @lines = $file->slurp( chomp => 1, split => qr/\s*,\s*/ );
kenahoo commented 11 years ago

Thanks Yanick. I just pushed a variant of this code, using the same interface & tests but implemented differently. I wanted to avoid the intermediate data copy whenever possible. Look okay to you?

yanick commented 11 years ago

I don't see it on the master branch. But I'll trust you on doing the right thing. :smile:

Thanks! And, btw? Path::Class? One of the most useful modules out there. :heart:

kenahoo commented 11 years ago

Oops, I just noticed the push had failed. It should be there now.

yanick commented 11 years ago

Beautiful. :-)