NAME

JavaScript::Code - JavaScript Code Framework

SYNOPSIS

#!/usr/bin/perl

use strict;
use warnings;
use JavaScript::Code::Variable;

my $string = JavaScript::Code::Variable->new();
$string->name( 'a' );
$string->value( 'This is a Test!' );
print $string->output;

my $number = JavaScript::Code::Variable->new()->name('b')->value( 288957 );
print $number->output;

my $strnumber = JavaScript::Code::Variable->new( { name => 'c' } );
$strnumber->value( JavaScript::Code::String->new(value => 288957) );
print $strnumber->output;

my $array = JavaScript::Code::Variable->new( { name => 'd' } );
$array->value( [0, 1] );
print $array->output;

DESCRIPTION

METHODS

$self->name( $name )

Gets or sets the name of the variable.

$self->value( $value )

Gets or sets the value of the variable.

$self->output( )

SEE ALSO

JavaScript::Code

AUTHOR

Sascha Kiefer, esskar@cpan.org

LICENSE

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.