in reply to Re: X-platform testers wanted: new version of Devel::Size
in thread X-platform testers wanted: new version of Devel::Size

I think you should probably just upgrade, because the current cpan version does coderefs just fine:

c:\test>perl -MDevel::Size=total_size -wle"sub x{ $_[0]*10 } print total_size(\&x)" 2884 c:\test>perl -MDevel::Size=total_size -wle"print total_size(\%::)" 199700

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^3: X-platform testers wanted: new version of Devel::Size
by Burak (Chaplain) on Oct 02, 2008 at 18:55 UTC
    Unfortunately new version (0.71) does not fix this issue. And in fact, if this was fixed, I think the the related bug was closed too :) Here is a little sample that'll crash your perl:
    perl -wle "use strict;use Devel::Size qw(total_size);my$t=sub{my$x=''; +};print total_size($t);"
    You'll see something like:
    Free to wrong pool 286ee8 not 286f30.
    And perhaps a Windows crash dialogue (if you didn't disable it).
        Thanks, that was quick :)

        Btw, I thought that "Free to wrong pool" errors were only related to threads, but I got this crash too on a non-threaded perl under linux and Devel::Size does not seem to use threads at all. So, it looks like either my info is wrong or I'm missing something. Can you give some info on the cause?

        Anything else you are aware of?
        Nope. That was the biggest (and only I guess) problem I've faced since it crashes (which can not be handled by eval {}) instead of die()ing (which can be handled by eval{})