|
From: Michael H. <mi...@nd...> - 2008-07-24 14:29:40
|
In two specific code paths, the messages attribute was being set
to something other than an arrayref. When this happened, code that
expected an arrayref, as documented, would generate an exception
like
Can't use string ("B0001Y73VY is not a valid value ") as an
ARRAY ref while "strict refs" in use at
/usr/local/share/perl/5.8.8/Net/Amazon/Response.pm line 38.
These two cases appear to be simple typos.
Signed-off-by: Michael Hendricks <mi...@nd...>
---
It looks like the mailing list has only received spam messages for the last few
weeks. I've cc'd the mailing list as requested in the module documentation,
but I also cc'd both authors.
Thanks for the great module.
lib/Net/Amazon.pm | 2 +-
lib/Net/Amazon/Response/Wishlist.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Net/Amazon.pm b/lib/Net/Amazon.pm
index f98aec2..247fa01 100644
--- a/lib/Net/Amazon.pm
+++ b/lib/Net/Amazon.pm
@@ -464,7 +464,7 @@ sub is_page_error {
push @errors, $e->{Message};
}
# multiple errors, set arrary ref
- $self->messages( @errors );
+ $self->messages( \@errors );
} else {
# single error, create array
$self->messages( [ $errref->{Error}->{Message} ] );
diff --git a/lib/Net/Amazon/Response/Wishlist.pm b/lib/Net/Amazon/Response/Wishlist.pm
index 482d67b..21b808b 100644
--- a/lib/Net/Amazon/Response/Wishlist.pm
+++ b/lib/Net/Amazon/Response/Wishlist.pm
@@ -80,7 +80,7 @@ sub is_page_error {
push @errors, $e->{Message};
}
# multiple errors, set arrary ref
- $res->messages( @errors );
+ $res->messages( \@errors );
} else {
# single error, create array
return -1 if $errref->{Error}->{Message} =~ /Valid values must be/;
--
1.5.6
|