To work like perl's builtins, you need to use a * prototype to take a bareword or a scalar containing a string handle name or a glob or a globref or an ioref (or undef, but that's much harder to duplicate) and turn it into a usable handle, qualifying barewords with the caller's package. There is some advice on this in perlsub under
Prototypes.