<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1453824828231_2599"><span id="yui_3_16_0_1_1453824828231_2653">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 id="yui_3_16_0_1_1453824828231_2599"><span><br></span></div><div id="yui_3_16_0_1_1453824828231_2599"><span>Mark</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" 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 dir="ltr"><font size="2" face="Arial"> On Tuesday, January 26, 2016 10:05 AM, Robert Stone via Houston <houston@pm.org> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv3228123884"><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" target="_blank" href="http://search.cpan.org/dist/WWW-LogicBoxes/lib/WWW/LogicBoxes.pm">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>_______________________________________________<br>Houston mailing list<br><a ymailto="mailto:Houston@pm.org" href="mailto:Houston@pm.org">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></body></html>