Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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...

Comment on What does Autovivify mean?
Replies are listed 'Best First'.
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.

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2015-12-01 06:57 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (795 votes), past polls