Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: Undocumented join() feature, now defunct? (++$i)

by FloydATC (Deacon)
on Oct 30, 2014 at 09:22 UTC ( [id://1105592]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Undocumented join() feature, now defunct? (++$i)
in thread Undocumented join() feature, now defunct?

I think you've pointed out a very cool way join() and tie() could have been used together had this been a known/documented behavior of join() from the beginning and one could even imagine join accepting a {} block or a sub reference to determine how $a and $b should be joined together.

Unfortunately, there's no indication that this was intended to be possible and so the documentation should IMHO clearly point out exactly what the limitations of join() are, and that this behaviour is broken in certain versions.

OR, they could unoptimize the code and make it official from some future version of Perl while pointing out clearly that although this behaviour can be seen in certain earlier versions it can't be relied upon until this exact version.

After all, tie() is a part of Perl and it's not so unreasonable to try and use it to pull off magic tricks. That's what it's there for, like it or not.

-- FloydATC

Time flies when you don't know what you're doing

  • Comment on Re^5: Undocumented join() feature, now defunct? (++$i)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-16 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found