Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2018-06-22 08:39 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (122 votes). Check out past polls.