Skip to content

Commit

Permalink
Implement simple version of sub lines to get minmax.t working.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Feb 23, 2010
1 parent 7c90f14 commit a1ed7ff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/IO.pm
Expand Up @@ -124,4 +124,11 @@ sub unlink($filename) {
}
}

# CHEAT: This function is missing a bunch of arguments,
# and should be more robust.
multi lines (Str $filename, Any $limit = *) {
my $fh = open $filename or fail "Unable to open $filename";
$fh.lines($limit);
}

# vim: ft=perl6

0 comments on commit a1ed7ff

Please sign in to comment.