The reason a change was made:

FromNicholas Clark
reply-toEric Brine,
perl5 porters <perl5-porters@perl.org>
toEric Brine
ccperl5 porters <perl5-porters@perl.org>
dateFri, Sep 4, 2009 at 2:55 PM
subjectRe: rvalue $#a adds magic

On Fri, Sep 04, 2009 at 02:46:26PM -0400, Eric Brine wrote:
> Before 5.10, $#a didn't add magic to @a

> Since 5.10.0, it does.

> Is that intentional?
> What's the purpose?

It's storing the value for $#a in the magic. Most arrays don't use $#a, which means that before 5.10 nearly every array consumes 1 pointers-worth of memory just to store NULL.

I did it in 2005: http://perl5.git.perl.org/perl.git/commitdiff/a3874608cd3b


In reply to Re^5: perl5.10 Devel::Size behaviour changed? (reason for magic) by ikegami
in thread perl5.10 Devel::Size behaviour changed? by sang1986

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.