Skip Menu |

This queue is for tickets about the JavaScript CPAN distribution.

Report information
The Basics
Id: 25226
Status: resolved
Priority: 0/
Queue: JavaScript

People
Owner: Nobody in particular
Requestors: gwilliams [...] cpan.org
Cc: greg [...] evilfunhouse.com
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.02
  • 1.03
Fixed in:
  • 1.04
  • 1.05
  • 1.06
  • 1.07
  • 1.08



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 $@;