Skip to content

Instantly share code, notes, and snippets.

@xaicron
Created February 15, 2013 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xaicron/4960500 to your computer and use it in GitHub Desktop.
Save xaicron/4960500 to your computer and use it in GitHub Desktop.
package Object;
sub new {
bless {}, __PACKAGE__;
}
sub DESTROY {
eval {};
}
package main;
eval {
my $obj = Object->new;
die "foo";
};
if (my $e = $@) {
warn $e;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment