Ricardo SIGNES > HTML-Widget-Plugin-JS-0.004 > HTML::Widget::Plugin::JS

Download:
HTML-Widget-Plugin-JS-0.004.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.004   Source   Latest Release: HTML-Widget-Plugin-JS-0.005

NAME ^

HTML::Widget::Plugin::JS - a JavaScript variable declaration emitter

VERSION ^

version 0.004

js_var

js_vars

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 ];

js_anon

This widget converts a given data structure to an anonymous JavaScript structure. This basically just provides a widget factory interface to Data::JavaScript::Anon.

AUTHOR ^

Ricardo SIGNES

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2008 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: