Data-JavaScript

 view release on metacpan or  search on metacpan

TODO  view on Meta::CPAN

ECMAScript and charset support for hjsdump

Encoding, escape [^[:print:]]
	Doesn't seem to include Unicode in 5.8.4...

Numbers
	Infinity

	NaN

	const (check attribute?)

Lightweight (object initializer) output for 1.2+
	JavaScript 1.2 and later support a compact object notation known
	as object literals. We probably want to walk depth first if using
	this notation.

	HASH = {key:val}
	ARRAY= [0, 1, 2]

lib/Data/JavaScript.pm  view on Meta::CPAN

  use Data::JavaScript {JS=>1.3};          # The new default
  use Data::JavaScript {JS=>1.1};          # Old (pre module v1.10) format

JavaScript 1.3 contains support for UTF-8 and a native C<undefined> datatype.
Earlier versions support neither, and will default to an empty string C<''>
for undefined values. You may define your own default--for either version--at
compile time by supplying the default value on the C<use> line:

  use Data::JavaScript {JS=>1.1, UNDEF=>'null'};

Other useful values might be C<0>, C<null>, or C<NaN>.

=head1 EXPORT

In addition, althought the module no longer uses Exporter, it heeds its
import conventions; C<qw(:all>), C<()>, etc.

=over

=item jsdump('name', \$reference, [$undef]);



( run in 0.252 second using v1.01-cache-2.11-cpan-4d50c553e7e )