Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Is there a problem with using barewords as filehandles ?

by syphilis (Archbishop)
on Jul 18, 2020 at 04:03 UTC ( [id://11119477]=note: print w/replies, xml ) Need Help??


in reply to Is there a problem with using barewords as filehandles ?

use of barewords as filehandles will be disallowed in perl 7

Just a couple of additional questions:
When (if) bareword filehandles are disallowed, will we still be able to do:
print STDERR 'ok';
I thought this might have been touched on elsewhere in this thread, but I can't see it now. (Apologies if I've missed it.)
Also, if foo() is an XSub that takes a FILE* as its first argument, would I still be allowed to call it from perl with:
foo(*STDOUT, ....);
Maybe I should just wait and see what happens ?

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Is there a problem with using barewords as filehandles ?
by haukex (Archbishop) on Jul 18, 2020 at 07:20 UTC
    When (if) bareword filehandles are disallowed, will we still be able to do: print STDERR 'ok';

    If bareword::filehandles is anything to go by, then STDIN, STDOUT, STDERR, ARGV, ARGVOUT, and DATA would still be allowed.

      If bareword::filehandles is anything to go by ....

      Aaah, yes - I'll take my cues from bareword::filehandles. Seems likely (even if not actually guaranteed) that this would be something we "can go by".
      So far, so good - the changes I've made are working ok under use bareword::filehandles;
      Thanks haukex.

      Cheers,
      Rob
        Seems likely (even if not actually guaranteed) that this would be something we "can go by".

        True, and BTW, another very good hint that they will stay is that the same filehandles are also listed in the new standard.pm.

Re^2: Is there a problem with using barewords as filehandles ?
by LanX (Saint) on Jul 19, 2020 at 02:47 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119477]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-28 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found