Skip to content

Instantly share code, notes, and snippets.

@theory
Created April 9, 2013 19:04
Show Gist options
  • Select an option

  • Save theory/5348441 to your computer and use it in GitHub Desktop.

Select an option

Save theory/5348441 to your computer and use it in GitHub Desktop.
sub hurl {
@_ = (
__PACKAGE__,
previous_exception => $@,
ref $_[0] ? %{ $_[0] }
: @_ == 1 ? (message => $_[0])
: (ident => $_[0], message => $_[1])
);
goto __PACKAGE__->can('throw');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment