Catalyst::Model::Text::MicroTemplate::ViewData - Default model for Catalyst::View::Text::MicroTemplate::PerRequest
sub root :Chained(/) CaptureArgs(0) { my ($self, $c) = @_; $c->view->data->set(z=>1); }
This is the default model used by Catalyst::View::Text::MicroTemplate::PerRequest to collect information that will be presented as data to the client.
Generally you will access this via '$c->view->data'. However it is setup as a per request model in Catalyst so you can access it via '$c->model("Text::MicroTemplate::ViewData")'. which might have some use if you are populating values in other dependent models.
This model consumes the role Data::Perl::Role::Collection::Hash and gets all its method from it.
Catalyst::View::Text::MicroTemplate::PerRequest, Catalyst, Data::Perl, Moo.
John Napiorkowski email:jjnapiork@cpan.org
Copyright 2015, John Napiorkowski email:jjnapiork@cpan.org
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::View::Text::MicroTemplate::PerRequest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::View::Text::MicroTemplate::PerRequest
CPAN shell
perl -MCPAN -e shell install Catalyst::View::Text::MicroTemplate::PerRequest
For more information on module installation, please visit the detailed CPAN module installation guide.