Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
What's wrong with these candidates?
proto sub slurp(|) {*}
multi sub slurp(*%_) { $*ARGFILES.slurp(|%_) }
multi sub slurp(IO::Handle:D $fh, *%_) { $fh.slurp(|%_) }
multi sub slurp(IO() $path, *%_) { $path.slurp(|%_) }
proto sub spurt($, $, |) {*}
multi sub spurt(IO::Handle:D $fh, $data, *%_) { $fh.spurt($data, |%_) }
multi sub spurt(IO() $path, $data, *%_) { $path.spurt($data, |%_) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment