No description, website, or topics provided.
Perl 6 C++ Makefile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/JavaScript Update the bare-bones docs Nov 30, 2015
t Properly convert Object when calling a function Nov 30, 2015
.gitignore Add precomp to gitignore Nov 30, 2015
.travis.yml Un-cd after building Spidermonkey Nov 30, 2015
LICENSE Initial commit Nov 11, 2015
META.info Use SPDX identifier in license field of META.info Apr 26, 2017
Makefile Try to fix travis refusing to install libmozjs Nov 30, 2015
README.md
p6-spidermonkey.cpp Manually encode strings to UTF-16 blobs Nov 30, 2015

README.md

Build Status

NAME

JavaScript::SpiderMonkey - glue for Mozilla's JavaScript interpreter

SYNOPSIS

This is still really hard in development you don't even know, so this interface is still in flux.

use JavaScript::SpiderMonkey;

my $thing = js-eval('({
    add : function(a, b) { return a + b; },
})')

say $thing.add( 1,   2 ); # 3
say $thing.add('1', '2'); # 12

TODO

  • Nicer errors

  • Implement console.log and friends

  • Use LibraryMake and compile this sanely

  • Write more tests

  • Test multiple SpiderMonkey versions

  • Calling JavaScript from Perl6:

  • → Also allow calling things on the global object

  • → Convert hashes and arrays

  • Writing to JavaScript object and array elements

  • Call Perl6 from JavaScript somehow (https://github.com/jnthn/zavolaj#function-arguments)

  • Add documentation

AUTHOR

Carsten Hartenfels

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Carsten Hartenfels. This program is distributed under the terms of the Artistic License 2.0. For further information, please see LICENSE or visit http://www.perlfoundation.org/attachment/legal/artistic-2_0.txt.