New prototype accepted; next patch almost done

Reading time: 1 minute

My patch for a new perl prototype was accepted and should be in Perl 5.13.7 in November. From the change log:

Add single-term prototype

The C<+> prototype is a special alternative to C<$> that will act like

C<[@%]> when given a literal array or hash variable, but will otherwise

force scalar context on the argument. This is useful for functions which

should accept either a literal array or an array reference as the argument

I’ve finished most of the hard work on my next patch, which would allow push/pop/keys/values/etc to act directly on references of an appropriate type. Now, I’m drafting the email that explains the change and the rationale and hope to submit it to the p5p list later this week.

If you liked what I was proposing in some of my recent posts on the topic, keep your fingers crossed that any debate on it is mild and constructive and we’ll have some new, cool features in Perl for either Thanksgiving or Christmas.

•      •      •

If you enjoyed this or have feedback, please let me know by or