Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
laziness, impatience, and hubris
 
PerlMonks  

What does Autovivify mean?

by bm (Hermit)
on Sep 09, 2003 at 06:37 UTC ( #289951=note: print w/ replies, xml ) Need Help??


in reply to Autovivify Module?

I hope this is not a silly question.
Can someone please define autovivify for me? I have seen it around the monastery but have never found a clear explanation...
Thanks
--
bm


Comment on What does Autovivify mean?
Re: What does Autovivify mean?
by PodMaster (Abbot) on Sep 09, 2003 at 07:06 UTC
    It's documented in perlref(tut), perlfaq4(*), perlfunc as well as at "Autovivification".

    If you're wondering how I know, I searched my pod for autovivi (and just typed in Autovivification in the search box above).

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: What does Autovivify mean?
by Anonymous Monk on Sep 09, 2003 at 07:14 UTC

    Vivify:to give life to; bring to life; to animate.

    my $hash; print "\$hash is: ", defined $hash ? $hash : "undefined", "\n"; if ($hash->{one}){ print "'one' exists\n"; } print "\$hash is: ", defined $hash ? $hash : "undefined", "\n";

    $hash is undefined, but when we use it as if it were a reference to a hash ($hash->{one}) perl automatically brings a hash reference to life and stores it in $hash. Hence, it autovivifies the hash reference for us.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://289951]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (16)
As of 2014-04-17 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (454 votes), past polls