App::Manoc::View::JSON
version 2.99.2
sub list_js : Chained('object_list') : PathPart('js') : Args(0) { my ( $self, $c ) = @_; $c->stash( json_data => \@my_list ); $c->forward('View::JSON'); }
App::Manoc::View::JSON - Catalyst JSON View
sub encode_json { my ( $self, $c, $data ) = @_;
if ( not defined($data) ) { $c->response->status(403); $c->detach(); return; } my $encoder = JSON->new->utf8(); $encoder->allow_blessed(1); $encoder->convert_blessed(1); return $encoder->encode($data); }
Catalyst::View::JSON
Gabriele Mambrini <gmambro@cpan.org>
Enrico Liguori
This software is copyright (c) 2017 by Gabriele Mambrini.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::Manoc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Manoc
CPAN shell
perl -MCPAN -e shell install App::Manoc
For more information on module installation, please visit the detailed CPAN module installation guide.