Last active
August 29, 2015 14:18
-
-
Save Tux/8ebe8af1949c2aced18b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I don't want this inside Text::CSV | |
class IO::String is IO::Handle { | |
use File::Temp; | |
multi method new (Str $str!) returns IO::Handle { | |
(my Str $filename, my $fh) = tempfile; | |
$fh.print ($str); | |
$fh.close; | |
return open $filename, :r, chomp => False; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment