use Exception::Class::TCF; try { &something_that_throws_exceptions } catch 'Default' => \&exception_handler;