Skip to content
Browse files

[Text::CSV] improved previous commit

The stringification should be applied, but not in the place where it was.
  • Loading branch information...
1 parent 7993946 commit 4e33e50f14a9b18d680a8c14faeeea3a499256ed @masak committed Aug 8, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Text/CSV.pm
View
4 lib/Text/CSV.pm
@@ -23,7 +23,7 @@ class Text::CSV {
sub extract_text($m, :$trim) {
my $text = ($m<quoted_contents> // $m).subst('""', '"', :global);
- return $trim ?? $text.trim !! $text;
+ return $trim ?? $text.trim !! ~$text;
}
method parse($input, :$trim is copy, :$strict is copy,
@@ -50,7 +50,7 @@ class Text::CSV {
or die "Sorry, cannot parse";
my @lines = $<line>;
my @values = map {
- [map { extract_text(~$_, :$trim) }, .<value>]
+ [map { extract_text($_, :$trim) }, .<value>]
}, @lines;
if $strict eq 'default' {
$strict = $output.lc ne 'arrays';

0 comments on commit 4e33e50

Please sign in to comment.
Something went wrong with that request. Please try again.