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