In addition to passing
$_[0] to CORE::open, prototyping the logging function with *$;@ (assuming you don't want to support 1-arg open, which is more of a historical curiousity than anything else) may be needed for code that you
haven't yet upgraded to using lexicals. Also, if the logging function is in a different package, use Symbol::qualify_to_ref (see
perlsub) on defined non-glob, non-reference
$_[0].