in reply to Re: Why does exists cause autovivication? (myth, mods)
in thread Why does exists cause autovivication?

Fortunately, we now have the autovivification pragma on CPAN... tye, you couldn't have specified it better!

  • Comment on Re^2: Why does exists cause autovivication? (myth, mods)

Replies are listed 'Best First'.
Re^3: Why does exists cause autovivication? (XS--)
by tye (Sage) on Jul 09, 2015 at 17:18 UTC

    No, the autovivification pragma on CPAN tries to be what I described but it accomplishes it an unfortunately very complex way. It has to reimplement a bunch of Perl guts inside of the module. The level of hidden complexity is impressive, which makes the potential for subtle problems that are very hard to diagnose also high.

    As much as I'd like a "don't autovivify" pragma, I won't use its 1800 lines of XS code given how many subtle bugs I've spent way too much time on from much, much fewer and simpler lines of XS so many times.

    - tye