disable auto-instantiation or warn about it

Nicholas Clark nick at ccl4.org
Fri Jul 13 18:24:41 BST 2007

On Fri, Jul 13, 2007 at 04:36:02PM +0100, Dagfinn Ilmari Mannsker wrote:
> On Fri, 2007-07-13 at 16:13 +0100, Jonathan Stowe wrote:

> > It's generally called auto-vivification. However you want to "use
> > strict" that will stop that particular class of bug.
> Huh?
> $ perl -Mstrict -Mwarnings -le 'my $foo; my $bar = $foo->{bar}; print $foo'
> HASH(0x604290)

I think that he's coming from the future when someone patched perl to be
able to disable it.*

Nicholas Clark

* ie there are times when I have wanted it, and sometimes I think that it would
  be useful to have a pragma to disable it.

More information about the london.pm mailing list