NAME

Catalyst::Model::JSON::ViewData - Default model for Catalyst::View::JSON::PerRequest

SYNOPSIS

sub root :Chained(/) CaptureArgs(0) {
  my ($self, $c) = @_;
  $c->view->data->set(z=>1);
}

DESCRIPTION

This is the default model used by Catalyst::View::JSON::PerRequest to collect information that will be presented as JSON 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("JSON::ViewData")'. which might have some use if you are populating values in other dependent models.

METHODS

This model consumes the role Data::Perl::Role::Collection::Hash and gets all its method from it.

SEE ALSO

Catalyst::View::JSON::PerRequest, Catalyst, Data::Perl, Moo.

AUTHOR

John Napiorkowski email:jjnapiork@cpan.org

COPYRIGHT & LICENSE

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.