Structured exceptions 

sub throw {
  my($msg) = @_;
  my($package, $file, $line) = caller(0);
  die {file => $file, line => $line, message => $msg};
}