JavaScript::PerlArray - Encapsulate a Perl array in JavaScript space
Creates a new instance with an empty array.
Returns a reference to the underlying array.
This class is exposed in JavaScript space as PerlArray and can be instanciated using new PerlArray();.
new PerlArray();
Pushes the arguments onto the array
Unshifts (ie inserts in the beginning) the arguments into the array.
Returns the top element.
Returns the bottom element.
Instances of this class can be accessed as a normal array using integer indicies like arr[2] both for reading and setting. If a negative index is used it is relative to the tail.
arr[2]
The number of items in the array.
To install JavaScript, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JavaScript
CPAN shell
perl -MCPAN -e shell install JavaScript
For more information on module installation, please visit the detailed CPAN module installation guide.