in reply to Re^2: Why does "flush filehandle" work? (indirect object)
in thread Why does "flush filehandle" work?
I remembered patching IO::Handle::say , but this will only affect say STDOUT "text" if feature "say" is not activated. Otherwise it's not working.¹
This means the print and say built-ins are only mimicking the indirect object notation and completely ignoring the methods.
Kind of disappointing². :/
But seems like technically you are right.
(While I still remember being able to make it work, I can't find the thread anymore)
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
¹) NB STDOUT->say() will always call the patched version
²) because say $FH and $FH->say will diverge after patching say
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Why does "flush filehandle" work? (indirect object)
by etj (Priest) on Jan 30, 2025 at 00:12 UTC | |
Re^4: Why does "flush filehandle" work? (indirect object)
by ikegami (Patriarch) on Jan 30, 2025 at 03:06 UTC | |
by LanX (Saint) on Jan 30, 2025 at 11:21 UTC | |
by etj (Priest) on Jan 31, 2025 at 02:25 UTC |