<div dir="ltr">I always do the latter mechanism anyway because there is no ambiguity.   It has bit me in the past.<div><br></div><div>Julian</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 26, 2016 at 10:19 AM, Mark Allen via Houston <span dir="ltr"><<a href="mailto:houston@pm.org" target="_blank">houston@pm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:verdana,helvetica,sans-serif;font-size:13px"><div><span>It was my understanding that most of the "automagic dereferencing" behaviors are being removed because although they *usually* do what you mean, they sometimes do not and that leads to mysterious and difficult to track down bugs.</span></div><div><span><br></span></div><div><span>Mark</span></div> <div><br><br></div><div style="display:block"> <div style="font-family:verdana,helvetica,sans-serif;font-size:13px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div><div class="h5"> <div dir="ltr"><font size="2" face="Arial"> On Tuesday, January 26, 2016 10:05 AM, Robert Stone via Houston <<a href="mailto:houston@pm.org" target="_blank">houston@pm.org</a>> wrote:<br></font></div>  <br><br> </div></div><div><div><div class="h5"><div><div dir="ltr">Greetings,<div><br></div><div>I've just released a heavily refactored version of my WWW::LogicBoxes module to cpan (<a rel="nofollow" href="http://search.cpan.org/dist/WWW-LogicBoxes/lib/WWW/LogicBoxes.pm" target="_blank">http://search.cpan.org/dist/WWW-LogicBoxes/lib/WWW/LogicBoxes.pm</a>), Huzzahs are in order!</div><div><br></div><div>However, cpan testers pointed out an issue to me:</div><div><br></div><div><pre style="clear:both;margin:0px 30px 0.6em;font-size:10.4px;color:rgb(0,0,0)">Experimental keys on scalar is now forbidden at /tmp/loop_over_bdir-8387-8qtZ5O/WWW-LogicBoxes-1.0.1-syf1_3/blib/lib/WWW/LogicBoxes/Role/Command/Raw.pm line 165.</pre></div><div><br></div><div>Looking at the perldiag documentation:</div><div><br></div><div><u>5.22</u></div><div><br></div><div><div><font face="monospace, monospace">keys on reference is experimental</font></div><div><font face="monospace, monospace">(S experimental::autoderef) keys with a scalar argument is experimental and may change or be removed in a future Perl version</font></div></div><div><br></div><div><u>5.23</u></div><div><br></div><div><div><font face="monospace, monospace">Experimental %s on scalar is now forbidden</font></div><div><font face="monospace, monospace">(F) An experimental feature added in Perl 5.14 allowed each, keys, push, pop, shift, splice, unshift, and values to be called with a scalar argument. This experiment is considered unsuccessful, and has been removed. The postderef feature may meet your needs better</font>.</div></div><div><br></div><div><br></div><div><i>So, this code will now cause compilation failures:</i></div><div><br></div><div><div><font face="monospace, monospace">my $hashref = {</font></div><div><font face="monospace, monospace">    key => 'value',</font></div><div><font face="monospace, monospace">};</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">for my $key ( <b>keys $hashref</b> ) {</font></div><div><font face="monospace, monospace">    print $key . "\n";</font></div><div><font face="monospace, monospace">}</font></div></div><div><br></div><div><i>And should instead be:</i></div><div><br></div><div><div><font face="monospace, monospace">for my $key ( <b>keys %{ $hashref }</b> ) {</font></div><div><font face="monospace, monospace">    print $key . "\n";</font></div><div><font face="monospace, monospace">}</font></div></div><div><br></div><div>Good times!</div><div><br></div><div>I have to admit that the later is more explicit but I kinda feel like this violated the spirit of perl's "Do what I mean."  Is there any more backstory, or can anyone else put forward additional reasons as to why this functionality is being removed?</div><div><br></div><div>Best Regards,</div><div>Robert Stone</div></div></div><br></div></div>_______________________________________________<br>Houston mailing list<br><a href="mailto:Houston@pm.org" target="_blank">Houston@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/houston" target="_blank">http://mail.pm.org/mailman/listinfo/houston</a><br>Website: <a href="http://houston.pm.org/" target="_blank">http://houston.pm.org/</a><br><br></div>  </div> </div>  </div></div></div><br>_______________________________________________<br>
Houston mailing list<br>
<a href="mailto:Houston@pm.org">Houston@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/houston" rel="noreferrer" target="_blank">http://mail.pm.org/mailman/listinfo/houston</a><br>
Website: <a href="http://houston.pm.org/" rel="noreferrer" target="_blank">http://houston.pm.org/</a><br></blockquote></div><br></div>