Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^3: The Bad, the Ugly, and the Good of autovivification

by 5mi11er (Deacon)
on Apr 09, 2005 at 05:44 UTC ( #446222=note: print w/replies, xml ) Need Help??

in reply to Re^2: The Bad, the Ugly, and the Good of autovivification
in thread The Bad, the Ugly, and the Good of autovivification

I don't think the first part of your argument is strictly true. If you use the @key's option, it would be possible for keys to not exist, or to be added dynamically, thus you might still need to see if that key happened to exist or not.

However, you're correct that none of this stuff helps at all with respect to "auto-vivication". And your code example does appear to help work around the problem when dealing with nested structures.

Hmm, Merlyn recently posted a snippet that walked a structure to it's leaf nodes, maybe we could combine the ideas of that snippet with this code to create a new form of exists?


PS. the last paragraph was written "tongue-in-cheek", but it's late, and I would not be at all surprised to come into work on Monday to find someone actually wrote such a beast...

  • Comment on Re^3: The Bad, the Ugly, and the Good of autovivification

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://446222]
[Corion]: Hmm - is anybody aware of a "protocol-only" HTTP module? I'd like to teach Prima non-blocking HTTP ideally without using threads, but that means reimplementing/ rewriting something like HTTP::Tiny (except asynchronous) or AnyEvent::HTTP
[Corion]: Ideally, the HTTP state machine but with a way to feed it HTTP data whenever I get it instead of it actively doing stuff.
[Corion]: Now that I talk about this, maybe Net::Inspect::L7:: HTTP would be the right kind of thing for the responses at least.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2016-12-07 15:12 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (128 votes). Check out past polls.