HTML::Widget::Plugin::JS - a JavaScript variable declaration emitter
version 0.002
These are two names for the same widget. Given a hashref, they will produce JavaScript code to assign the data in the hashref.
In otherwords, this widget:
$fac->js_vars({ foo => { a => 1, b => 2 }, bar => [ 4, 2, 3 ], });
...will be rendered something like this:
var foo = { a: 1, b: 2 }; var bar = [ 1, 2, 3 ];
This widget converts a given data structure to an anonymous JavaScript structure. This basically just provides a widget factory interface to Data::JavaScript::Anon.
This code was written by Ricardo SIGNES.
This code is copyright (c) 2008, Ricardo SIGNES. It is free software, available under the same terms as perl itself.
To install HTML::Widget::Plugin::JS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Widget::Plugin::JS
CPAN shell
perl -MCPAN -e shell install HTML::Widget::Plugin::JS
For more information on module installation, please visit the detailed CPAN module installation guide.