Permalink
Browse files

[CSV] implemented .read-file

...which cannot be called slurp, due to a Parrot bug.
  • Loading branch information...
1 parent 943d258 commit e9c84110de3b7a262d1914c0310f88107ffc267c @masak committed Aug 15, 2009
Showing with 5 additions and 1 deletion.
  1. +1 −1 README
  2. +4 −0 lib/CSV.pm
View
2 README
@@ -3,7 +3,7 @@ Simple CSV (comma-separated values) format parser.
use v6;
use CSV;
- say CSV.slurp('somefile.csv').perl;
+ say CSV.read-file('somefile.csv').perl;
== License
View
@@ -31,4 +31,8 @@ class CSV {
[map { extract_text($_) }, parse_line($_)<value>]
}, @lines;
}
+
+ method read-file($filename) {
+ return self.read( slurp($filename) );
+ }
}

0 comments on commit e9c8411

Please sign in to comment.