Skip to content

Instantly share code, notes, and snippets.

@ktat
Created May 20, 2015 08:08
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 ktat/8dc4028a1e68fe45c43d to your computer and use it in GitHub Desktop.
Save ktat/8dc4028a1e68fe45c43d to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
package Test;
use Carp;
sub hoge {
Carp::croak("die"); # mesasge is "die at goto_test.pl line 22."
print join " ", @_;
};
package main;
sub xxx {my ($a,$b) = @_;
$a = 2, $b = 3; @_ = ($a, $b);
goto &Test::hoge
}
xxx(1,2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment