Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Strange behavior with List::Util qw{first} on perl >= 5.20

by Anonymous Monk
on May 26, 2015 at 23:09 UTC ( #1127914=note: print w/replies, xml ) Need Help??


in reply to Re: Strange behavior with List::Util qw{first} on perl >= 5.20
in thread Strange behavior with List::Util qw{first} on perl >= 5.20

A git bisect appears to confirm that. The bug also still appears to be present in the latest v5.22.0-RC2.

Replies are listed 'Best First'.
Re^3: Strange behavior with List::Util qw{first} on perl >= 5.20
by ikegami (Pope) on May 27, 2015 at 14:42 UTC

    There's something fishy about $_. It's a TEMP with REFCNT=1. I believe that means it's a mortal. If so, that means noone claims a reference to $_, but first still uses it after the callback returns. This points to a bug in List::Util.

    That said, the inplace lc($_)[1] should probably only happen in void context.


    1. This is the first I've ever heard about this!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1127914]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-06-23 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (125 votes). Check out past polls.

    Notices?