in reply to RE: RE: Re: A Not so Simple Append
in thread A Not so Simple Append

merlyn and I disagree on whether it is documented.

Look at perlref, item 6 on how to create a reference is to dereference them in a context that assumes they exist. That is why chained lookups autovivify, to continue down the chain the previous lookups were dereferenced in a context that assumed they existed. Likewise if you start assigning to stuff, it autovivifies. That holds for hashes and variables.

Now merlyn certainly knows this piece of documentation, so why do we disagree on whether it is documented? Well to his eyes this requires serious "reading between the lines" and you cannot expect people to figure it out. To mine, well the reader's attention is not drawn to the point, but once I saw that this is the rule that applies, I have not since run into an autovivification situation which I had trouble understanding...

  • Comment on RE (tilly) 4 (autovivify): A Not so Simple Append

Replies are listed 'Best First'.
RE: RE (tilly) 4 (autovivify): A Not so Simple Append
by merlyn (Sage) on Oct 03, 2000 at 18:46 UTC
      Because we discussed this specific piece of documentation in chatter once, talking about whether or not chained lookups were documented to autovivify. :-)

      Cheers,
      Ben

        "I have no strong feelings one way or the other."

        -- His Neutralness