Data-JavaScript reviews

cpanratings
 

RSS | Module Info | Add a review of Data-JavaScript

Data-JavaScript (1_11) *****

This is really only an answer to Smylers' rating: the output of Data::JavaScript is verbose because of the ability to dump circular structures. So a general rule of thumb would be: if you know your data structure is free of circular references, use Data::JavaScript::Anon, otherwise use Data::JavaScript.

All in all, Data::JavaScript is easy to use and does what it should. The only missing thing is unicode support.

EDIT: As of 1.10, unicode support is available.

Data-JavaScript (1_10)

No rating since I'm the maintainer. Unicode support has been added
in this version, and the module has always come with a file named
example.pl and a brief description with sample output in README.

The verbosity is why I created Data::JavaScript::LiteObject.
In the future we will be working on merging all of the other
dumpers into this one.

Data-JavaScript (1.08) ***

It would be much easier to quickly learn what this module achieves if its documentation provided some sample output.

So far as I can tell this module works: you pass it a Perl array or hash, and it constructs a valid JavaScript fragment for storing the same data in a JavaScript array or hash.

My main complaint is with the verbosity of the JavaScript it creates: repeating the variable name each time, rather than using the syntax for assigning an entire array or hash at once. Data::JavaScript::Anon provides better output.