diff options
author | franck cuny <franck@lumberjaph.net> | 2010-01-06 13:46:22 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-01-06 13:46:22 +0100 |
commit | 9e158fac8e2541a16db50009f9f4aecf42dcba5d (patch) | |
tree | bdda79a13ec59ad2663b8c3f9113092db8cd8602 | |
parent | Checking in changes prior to tagging of version 0.08. Changelog diff is: (diff) | |
download | moosex-net-api-9e158fac8e2541a16db50009f9f4aecf42dcba5d.tar.gz |
return deserialized content and http response
-rw-r--r-- | lib/MooseX/Net/API.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/MooseX/Net/API.pm b/lib/MooseX/Net/API.pm index 9b1d0fe..defbe2c 100644 --- a/lib/MooseX/Net/API.pm +++ b/lib/MooseX/Net/API.pm @@ -242,7 +242,14 @@ sub net_api_method { @deserialize_order ); } - return $content if ( $res->is_success ); + if ( $res->is_success ) { + if (wantarray) { + return ( $content, $res ); + } + else { + return $content; + } + } die MooseX::Net::API::Error->new( http_error => $res, |