Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    JavaScript::Code::Variable 0.08

    Download button

    No screenshots available
    Downloads: 317  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sascha Kiefer | More programs
    Perl Artistic License / FREE
    September 12th, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    JavaScript::Code::Variable description

    JavaScript::Code::Variable module contains a JavaScript variable element.

    JavaScript::Code::Variable module contains a JavaScript variable element.

    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;

    METHODS

    new

    $self->name( $name )

    Gets or sets the name of the variable.

    $self->full_name( )

    Gets the full name, that is, the name including the any index information

    $self->value( $value )

    Gets or sets the value of the variable.

    $self->declared( undef | 0 | 1 )

    If set to undef, the module will check the scope to decide whether or not the variable should be declared.

    If set to 0, the module is undeclared und will be declared in its context.

    If set to 1, the variable will to be declared in its context.

    $self->output( )

    Returns the javascript-code for that variable.

    $self->same( $var )

    Two variables are the same if they have the same name.

    $self->equal( $var )

    Two variables are equal if they have the same value.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    JavaScript element | variable element | Perl module | JavaScript | variable | element

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM