JavaScript::Duktape::XS - Perl XS binding for the Duktape Javascript embeddable engine
Version 0.000038
my $duk = JavaScript::Duktape::XS->new(); $duk->set('global_name', [1, 2, 3]); $duk->set('my.object.slot', { foo => [ 4, 5 ] }); $duk->set('function_name', sub { my @args = @_; return \@args; }); my $aref = $duk->get('global_name'); my $returned = $duk->eval('function_name(my.object.slot)'); $duk->dispatch_function_in_event_loop('function_name'); my $stats = $duk->get_stats(); # returns a hashref
This module provides an XS wrapper to call Duktape from Perl.
https://metacpan.org/pod/JavaScript::Duktape
Copyright (C) Gonzalo Diethelm.
This library is free software; you can redistribute it and/or modify it under the terms of the MIT license.
Gonzalo Diethelm gonzus AT cpan DOT org
gonzus AT cpan DOT org
Sami Vaarala for creating the Duktape Javascript embeddable engine.
To install JavaScript::Duktape::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JavaScript::Duktape::XS
CPAN shell
perl -MCPAN -e shell install JavaScript::Duktape::XS
For more information on module installation, please visit the detailed CPAN module installation guide.