Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement get and close subs.
  • Loading branch information
jnthn committed Aug 3, 2011
1 parent 9fdde9e commit 3b56d34
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/IO.pm
Expand Up @@ -153,6 +153,16 @@ multi sub lines($fh = $*ARGFILES, $limit = $Inf) {
$fh.lines($limit)
}

proto sub get(|$) { * }
multi sub get($fh = $*ARGFILES) {
$fh.get()
}

proto sub close(|$) { * }
multi sub close($fh) {
$fh.close()
}

$PROCESS::IN = open('-');
$PROCESS::OUT = open('-', :w);
$PROCESS::ERR = IO.new;
Expand Down

0 comments on commit 3b56d34

Please sign in to comment.