Skip Menu |

This queue is for tickets about the WWW-Scripter CPAN distribution.

Report information
The Basics
Id: 108645
Status: rejected
Priority: 0/
Queue: WWW-Scripter

People
Owner: Nobody in particular
Requestors: oleg [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: eval() makes $@ not usable
After eval() method $@ becomes always empty. Even after explicit die(). This makes exceptions handling not usable. Try test below. Expected output: "Error - Fatality!". Actual output: "No errors". use strict; use WWW::Scripter; eval { my $scripter = WWW::Scripter->new; $scripter->use_plugin('JavaScript'); $scripter->eval("var t = false;"); die "Fatality!"; }; if (my $err = $@) { die "Error - $err"; } warn "No errors";
Втр Ноя 10 03:32:46 2015, OLEG писал: Show quoted text
> After eval() method $@ becomes always empty. Even after explicit > die(). This makes exceptions handling not usable. > Try test below. Expected output: "Error - Fatality!". Actual output: > "No errors". > > use strict; > use WWW::Scripter; > > eval { > my $scripter = WWW::Scripter->new; > $scripter->use_plugin('JavaScript'); > $scripter->eval("var t = false;"); > die "Fatality!"; > }; > if (my $err = $@) { > die "Error - $err"; > } > > warn "No errors";
Found that bug is inside WWW::Scripter::Plugin::JavaScript::Guard: https://rt.cpan.org/Ticket/Display.html?id=108646