diff options
author | franck cuny <franck@lumberjaph.net> | 2010-06-08 15:22:36 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-06-08 15:22:36 +0200 |
commit | 78fcbf54a4305e1ee6c3a105f91af40c7ea0a62a (patch) | |
tree | c4eb6cec29a92076c2f6fc47ca318cbe59f5e0ba /lib/Net/HTTP/Console/Dispatcher/ExecuteMethod.pm | |
parent | update regex; modify http methods; .. (diff) | |
download | net-http-console-78fcbf54a4305e1ee6c3a105f91af40c7ea0a62a.tar.gz |
switch to MX::Declare; rename some roles and dispatcher
Diffstat (limited to '')
-rw-r--r-- | lib/Net/HTTP/Console/Dispatcher/ExecuteMethod.pm | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/Net/HTTP/Console/Dispatcher/ExecuteMethod.pm b/lib/Net/HTTP/Console/Dispatcher/ExecuteMethod.pm deleted file mode 100644 index 12a66e4..0000000 --- a/lib/Net/HTTP/Console/Dispatcher/ExecuteMethod.pm +++ /dev/null @@ -1,25 +0,0 @@ -package Net::HTTP::Console::Dispatcher::ExecuteMethod; - -use Moose; -with qw/Net::HTTP::Console::Dispatcher/; - -sub dispatch { - my ($self, $input) = @_; - (my $method, my $args) = $input =~ /^(\w+)\s(.*)$/; - my ($content, $response) = - $self->application->api_object->$method(%{JSON::decode_json($args)}); - $self->application->_set_and_show($content, $response); - 1; -} - -sub pattern { - my ($self, $input) = @_; - (my $method) = $input =~ /^(\w+)/; - - # XXX find_api_method_by_name ? - $self->application->api_object->meta->find_method_by_name($method) - ? return $input - : return 0; -} - -1; |