Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Consistency, syntax, and little minds

by Hercynium (Hermit)
on Jan 30, 2013 at 16:39 UTC ( #1016094=note: print w/replies, xml ) Need Help??

in reply to Consistency, syntax, and little minds

Wow, talk about a time warp! (it's just a jump to the left)

I ran across this thread looking for examples of the use of B::Generate (see diotalevi's post, below), for some enlightenment of my own.

When I read through the rest of the thread, I had a little chuckle realizing that few of the other commenters seem to have understood what you were asking for all those years ago - and it seems that none really saw the utility and advantage of it! Well, fast forward 9+ years but your idea is now in core, (more or less, unless I failed to understand it as well :), as of perl 5.14!

Recently I have been able to code on perl 5.14 and I find myself using this feature more and more often. I like that it adds a carefully-considered bit of DWIM in a places where I once added a lot of syntax that always felt tedious and distracting. I myself have wished explicit deref for push/keys/shift/etc. was unnecessary - and now it is! In the code where I am using this feature, other people working on or reviewing that code have expressed that they like the feature quite a bit.

More info here:
Original Patch and rationale from David Golden (xdg++) here:
  • Comment on Re: Consistency, syntax, and little minds

Replies are listed 'Best First'.
Re^2: Consistency, syntax, and little minds
by Arunbear (Parson) on Jan 30, 2013 at 17:46 UTC
    I was looking forward to this feature too, but when 5.14 was released the docs had this to say e.g. from push:
    Starting with Perl 5.14, push can take a scalar EXPR, which must hold a reference to an unblessed array. The argument will be dereferenced automatically. This aspect of push is considered highly experimental. The exact behaviour may change in a future version of Perl.
    ... which has discouraged me from using it :(

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016094]
[robby_dobby]: Likewise! I haven't seen a lot of people with HAs back where I come from, so I figured it might be the same around here too...
[robby_dobby]: Oh, shit -- I was replying to someone, but it wound up here. -_-
robby_dobby is still not used to PM's interface. /o\
[oiskuu]: War. War never changes.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (15)
As of 2017-11-17 19:37 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (272 votes). Check out past polls.