in reply to Re^2: catch die from say
in thread catch die from say

That's all wrong.

say $mail $textecourriel; is NOT an instance of indirect method call syntax. It's not a method call at all. It's a named operator with a funky syntax.

The indirect feature has no effect on this. (Neither does the indirect pragma.)

It does NOT confuse the Perl interpreter (because say is always declared, and because the handle expression is limited to a simple scalar, a bareword (if you use the bareword_filehandles anti-feature), or a block).

Unlike say $mail $textecourriel;, $mail->say( $textecourriel ); does invoke a method (of IO::Handle). This adds needless overhead and complexity. This is what should be avoided.

The IO::Handle::say method doesn't use say. It instead emulates it using local $\ = "\n"; and print. This is not equivalent in an (admittedly obscure) corner case.

The IO::Handle::say method ends up using print $mail $textecourriel; anyway. Because that's how one prints to a file handle in Perl. It's not something to avoid as you suggest.


If it's in perlfunc, it's not a method call. As such, none of the following are instances of indirect method call syntax: