CC: | greg [...] evilfunhouse.com |
Subject: | evaling bad javascript doesn't set $@ |
The documentation for JavaScript::Context::eval says:
If there is a compilation error (such as a syntax error) or an
uncaught exception is thrown in JavaScript this method returns
undef and $@ is set.
Despite trying to eval arbitrarily broken strings, I can't get the module to set the $@ variable to
allow for debugging. The attached 4 line example demonstrates the problem.
Subject: | js-test.pl |
#!/usr/bin/perl
use JavaScript;
my $rt = JavaScript::Runtime->new();
my $cx = $rt->create_context();
$cx->eval( "foo } bar {" );
warn $@;