in reply to Re^3: conditional catch-blocks 'try {} catch(COND) { }'
in thread conditional catch-blocks 'try {} catch(COND) { }'

>  handle_error($_, {  TypeError => sub {

I wanted to suggest

But I think Lukas already did this in Try::Tiny::ByClass

use Try::Tiny::ByClass; try { die $exception_object; } catch_case [ 'Some::Class' => sub { # handle Some::Class exceptions }, 'Exception::DivByZero' => sub { # handle Exception::DivByZero exceptions }, ], finally { # always do this };

Tho I sense a bit of confusion between finally and a "naked" catch

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery