lib/Quancom/Result.pm
changeset 13 d6f681329542
parent 8 c248fbd9b624
child 15 2d41fac09084
--- a/lib/Quancom/Result.pm	Sun Jan 04 18:42:46 2009 +0100
+++ b/lib/Quancom/Result.pm	Sun Jan 04 23:44:45 2009 +0100
@@ -24,7 +24,7 @@
     my $class = ref $_[0] ? ref shift : shift;
     my $self = bless {} => $class;
     my $r = shift;
-    $r = s/\s*$//;    # should match any \r or \n too
+    $r =~ s/\s*$//;    # should match any \r or \n too
 
     # decode the status
     if (($self->{error_code}) = $r =~ /^E(.)/) {
@@ -49,7 +49,7 @@
 sub data {
     my $self = shift;
     return undef if not $self->{ok};
-    return $self->{result};
+    return $self->{data};
 }
 
 sub error {