summaryrefslogtreecommitdiff
path: root/dist/Net-Ping
diff options
context:
space:
mode:
authorHojung Yoon <amoc.yn@gmail.com>2011-05-24 18:18:14 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-05-24 20:08:32 -0700
commit459b64da6c5743fa9093a9ef5214a82b46f2f7d0 (patch)
treecd1efb6cc33c5a8f9dee02b6434b87103345c9f6 /dist/Net-Ping
parenteee8d40ab2eee78fd8a8a007a74b8b97b9f3c053 (diff)
downloadperl-459b64da6c5743fa9093a9ef5214a82b46f2f7d0.tar.gz
[perl #90888] each(ARRAY) on scalar context should wrapped into defined()
"perldoc -f each" says that if each() is performed on ARRAY in scalar context, it will return only the index in an array. Calling each(HASH) in scalar context worked well but calling each(ARRAY) didn't because it was not wrapped into defined OPCODE. So, in Perl_newWHILEOP() and Perl_newLOOPOP(), they are modified to check them and wrap with defined OP if needed. In S_new_logop(), it's reasonable to warn if return value of each(ARRAY) is being used for boolean value, as it's first return value will be "0", the false. issue: #90888 link: http://rt.perl.org/rt3/Public/Bug/Display.html?id=90888
Diffstat (limited to 'dist/Net-Ping')
0 files changed, 0 insertions, 0 deletions