Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^7: On Backwards Compatibility and Bareword Filehandles

by ikegami (Patriarch)
on Jul 22, 2020 at 07:01 UTC ( [id://11119627]=note: print w/replies, xml ) Need Help??


in reply to Re^6: On Backwards Compatibility and Bareword Filehandles
in thread On Backwards Compatibility and Bareword Filehandles

how do they work with current indirect filehandles?

What's an "indirect filehandles"? You mean a lexical file handles (e.g. open(my $fh, ...))?

Perl usually accepts

  • A reference to an IO object.
  • A glob containing a reference to an IO object.
  • A reference to a glob containing a reference to an IO object.
  • A string naming a glob containing a reference to an IO object.

open(my $fh, ...) creates the third one. Every XS module that deals with file handles should support this.

The last is the least supported by XS functions, if at all.

The first is probably the next-least supported. The very ability to have references to IO object is relatively recent. That said, I mispoke about the extent of the breakage of CPAN that only support this type of handle would cause. In fact, I really don't know how much of CPAN would break if you suddenly changes the primary way to pass file handles around.

however, the simple case I was considering was more like:

That's irrelevant. I never said it would never work.

If I said that then I was mistaken

This is what you said. Clear as mud, I know. But there's no mention of Perl 7.

the goal was to provide an alternative to the removal of features suggested in the original Perl 7 announcement

Well, that's not entirely true, right? We're specifically talking about the removal of barewords. Maybe you have other features in mind too, but they're not being discussed here. So, like I said, the problem you're trying to solve is a need to avoid barewords. So my comment stands. What I provided a few posts up solves the problem a lot more simply and cleanly.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found