Pickles::Context - Pickles context class.
package MyApp::Context; use strict; use warnings; use parent 'Pickles::Context'; __PACKAGE__->load_plugins(qw(Encode)); 1; __END__
returns a application name.
returns a request object.
returns a response object.
returns config object.
render content with specified view class. if $view_class is omitted, $c->view_class is used as default.
construct absolute uri of the @path. \%query values are treat as QUERY_STRING.
redirect to the $url. default $code is 302. if $url is not absolute, the value is passed to $c->uri_for
abort next operation and goto finalize phase.
load plugins. Omit the Pickles::Plugin:: prefix from the name.
Pickles::Plugin::
Register a object. This method is delegated to Container. see Pickles::Container for details.
Container
get the registerred object referred by the given $name. This method is delegated to Container.
The following class variables specify component classes. Omit the $c->appname prefix from the class name.
# MyApp::View MyApp::Context->view_class('View'); # MyApp::View::TT MyApp::Context->view_class('View::TT');
if you want to use fully qualified class name, use plus sign prefix.
# Foo::View MyApp::Context->view_class('+Foo::View');
default value is +Pickles::Request
+Pickles::Request
default value is +Pickles::Response
+Pickles::Response
default value is View
View
Tomohiro Ikebe <ikebe {at} livedoor.jp>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Pickles, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pickles
CPAN shell
perl -MCPAN -e shell install Pickles
For more information on module installation, please visit the detailed CPAN module installation guide.