Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

What does Autovivify mean?

by bm (Hermit)
on Sep 09, 2003 at 06:37 UTC ( [id://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

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found