Skip Menu |

This queue is for tickets about the ConditionSystem CPAN distribution.

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

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

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



Subject: 'with_handlers' resets active handlers instead of temporarily adding
Calls to 'with_handler' don't properly nest, i.e. you can't use exceptions if some function you call also uses exceptions. $ cat nest.pl #!perl use warnings; use strict; use ConditionSystem; { package Err; sub new { bless {}, $_[0] } } { package ErrA; our @ISA = 'Err'; } { package ErrB; our @ISA = 'Err'; } with_handlers { with_handlers { die ErrA->new; die ErrB->new; } handle( ErrB => sub { print "handling ErrB\n"; } ); die ErrA->new; } handle( ErrA => sub { print "handling ErrA\n"; } ); __END__ $ perl nest.pl handling ErrB Expected output: handling ErrA handling ErrB handling ErrA