perl -e 'sub new {die@_} main->new(); open main, "foo"' #### package IO::Handle; sub new { *{shift(@_)}{NAME}->new(@_); }