in reply to Redefining Imported Subs: of scope and no
How do I dynamically redefine imported subroutines?
That's actually quite easy, but say is not being imported; it's not even a subroutine! say is an operator, and use feature 'say'; merely controls whether the compiler recognises it or not. (It always recognises CORE::say, though.)
Some operators can be overridden from within Perl by overriding GLOBAL::CORE::op, and some can't. The following checks whether say can be overridden this way:
>perl -E"say defined(prototype('CORE::say')) ?'yes':'no'"
Its funky syntax doesn't permit it.
say FILEHANDLE LIST
say BLOCK LIST
It could be done using a CallChecker, but that involves dropping to C/XS.