Eve::HttpResource - a base class for HTTP resource controllers.
package Eve::HttpResource::SomeResource; use parent qw(Eve::HttpResource); sub _get { # some implementation here }
Eve::HttpResource is a class encapsulating all the actual processing of an HTTP request. _get(), _post() and _delete() methods can be overriden by the class derivatives. If not overriden this methods throw Eve::Exception::Http::405MethodNotAllowed.
_get()
_post()
_delete()
Eve::Exception::Http::405MethodNotAllowed
Inside the described above methods class attributes _request, _response, _session_constructor and _dispatcher can be found.
_request
_response
_session_constructor
_dispatcher
response
an HTTP response object
session_constructor
a reference to a subroutine accepting the session id argument and returning a session object
id
dispatcher
an HTTP dispatcher object.
Processes an HTTP request delegating control to the appropriate HTTP method implementation.
matches_hash
a hash containing pattern matches from the URL.
request
an HTTP request object.
when a not allowed HTTP method specified.
a ready HTTP response object.
Returns a list of supported HTTP methods.
A list reference.
Copyright 2012 Igor Zinovyev.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Eve, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eve
CPAN shell
perl -MCPAN -e shell install Eve
For more information on module installation, please visit the detailed CPAN module installation guide.