Guest User

Untitled

a guest
May 25th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. diff -ur Amazon.orig/SimpleDB/Response.pm Amazon/SimpleDB/Response.pm
  2. --- Amazon.orig/SimpleDB/Response.pm 2008-10-25 16:33:47.000000000 +0200
  3. +++ Amazon/SimpleDB/Response.pm 2008-10-25 19:18:55.000000000 +0200
  4. @@ -12,9 +12,15 @@
  5. 'QueryResponse' => 1,
  6. );
  7.  
  8. +use Data::Dump qw/dump/;
  9. sub new {
  10. my $class = shift;
  11. - my $args = shift || {};
  12. + my $args = {};
  13. + if (ref($_[0]) eq 'HASH') {
  14. + $args = shift;
  15. + } else {
  16. + $args = +{ @_ };
  17. + }
  18. croak "No account" unless $args->{account};
  19. my $r = $args->{http_response};
  20. croak 'No HTTP::Response object in http_response'
  21. @@ -41,6 +47,7 @@
  22. }
  23. my $self = bless {}, $class;
  24. $self->{'account'} = $args->{account};
  25. + $self->{'domain'} = $args->{domain} if $args->{domain};
  26. $self->{'http_response'} = $r;
  27. $self->{'http_status'} = $r->code;
  28. $self->{'content'} = $tree;
Add Comment
Please, Sign In to add comment