MVC::Neaf::View::JS - JSON-based view for Not Even A Framework.
# define route ...
# your data ...
-view => 'JS', # this is the default as of 0.20
-jsonp => 'my.jsonp.callback', # this is optional
Will result in your application returning raw data in JSON/JSONP format instead or rendering a template.
%options may include:
want_pretty - sort keys & indent output
want_sorted - sort keys (this defaults to want_pretty)
preserve_dash - don't strip dashed options. Useful for debugging.
Returns a scalar with JSON-encoded data.
This module is part of MVC::Neaf suite.
Copyright 2016-2019 Konstantin S. Uvarin email@example.com.
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 MVC::Neaf, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.