Skip Menu |

This queue is for tickets about the JavaScript CPAN distribution.

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

Owner: Nobody in particular
Requestors: gwilliams [...]
Cc: greg [...]

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

CC: greg [...]
Subject: evaling bad javascript doesn't set $@
Download (untitled) / with headers
text/plain 411b
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.
text/x-perl 140b
#!/usr/bin/perl use JavaScript; my $rt = JavaScript::Runtime->new(); my $cx = $rt->create_context(); $cx->eval( "foo } bar {" ); warn $@;

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to