Skip Menu |

This queue is for tickets about the ConditionSystem CPAN distribution.

Report information
The Basics
Id: 82498
Status: new
Priority: 0/
Queue: ConditionSystem

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

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



Subject: restarts established by 'restart_case' linger on
After 'restart_case' establishes a set of restarts, it doesn't clean up after itself. The restarts remain active long after 'restart_case' has returned and can be invoked from other scopes. $ cat restart.pl #!perl use warnings; use strict; use ConditionSystem; { package Exception; sub new { bless {}, $_[0] } } with_handlers { restart_case { Exception->new } bind_continue(say_hi => sub { print "hi\n"; }) } handle(Exception => restart('say_hi')); with_handlers { die Exception->new; } handle(Exception => restart('say_hi')); __END__ $ perl restart.pl hi hi Expected output: hi <error: no such restart: 'say_hi'> or some other kind of error for the second restart() call.