There's more than one way to do things | |
PerlMonks |
Re: Explaining Autovivicationby Joost (Canon) |
on Jun 12, 2008 at 00:49 UTC ( [id://691571]=note: print w/replies, xml ) | Need Help?? |
autovivication basically means that datastructures are automatically expanded at first use.
For instance, if you've got a hash and access a not previously instantiated element and treat it like a hash reference, a hash reference will be created for you: This means you need to do less explicit typing/instantiating, at the cost of possibly accidentally creating structures that aren't there when you mistype. Note that perl will still throw an error when you for example treat a hash reference as an array reference, so there's still some checking going on.
In Section
Seekers of Perl Wisdom
|
|