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
};