sub is_code { no warnings qw( void uninitialized ); return '' ne ref $_[0] && eval { defined &{$_[0]} }; }