diff options
author | franck cuny <franck@lumberjaph.net> | 2010-06-03 08:34:13 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-06-03 08:34:13 +0200 |
commit | fdb180a73f97d5a1456d5ac3d0a5a844e22d0ea9 (patch) | |
tree | 6ed25ba47d0407ed4dbacdc14711fffa90aa9060 /lib/MooseX | |
parent | update tests (diff) | |
download | moosex-net-api-fdb180a73f97d5a1456d5ac3d0a5a844e22d0ea9.tar.gz |
http-console: a simple http console to do REST query (like http://github.com/cloudhead/http-console)
Diffstat (limited to '')
-rw-r--r-- | lib/MooseX/Net/API/Meta/Method.pm | 2 | ||||
-rw-r--r-- | lib/MooseX/Net/API/Meta/Method/APIMethod.pm | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/MooseX/Net/API/Meta/Method.pm b/lib/MooseX/Net/API/Meta/Method.pm index 3f77d08..bb29a97 100644 --- a/lib/MooseX/Net/API/Meta/Method.pm +++ b/lib/MooseX/Net/API/Meta/Method.pm @@ -99,7 +99,7 @@ sub wrap { die MooseX::Net::API::Error->new( http_error => $result, - reason => $result->reason, + reason => $result->message, ); }; $args{body} = $code; diff --git a/lib/MooseX/Net/API/Meta/Method/APIMethod.pm b/lib/MooseX/Net/API/Meta/Method/APIMethod.pm index b1d0777..8185522 100644 --- a/lib/MooseX/Net/API/Meta/Method/APIMethod.pm +++ b/lib/MooseX/Net/API/Meta/Method/APIMethod.pm @@ -30,6 +30,7 @@ before add_net_api_method => sub { sub add_net_api_method { my ($meta, $name, %options) = @_; + # accept blessed method my $code = delete $options{code}; $meta->add_method( $name, |