[londonperl] Re: disable auto-instantiation or warn about it

Frank v Waveren fvw.london.pm at var.cx
Fri Jul 13 20:04:07 BST 2007


Disabling or warning for it would prevent bugs that go:

if ($object->{"thingy"} == 42) 
{ 
   # Do stuff;
}

...
# Lots of code
...

if ($object) 
{ 
    # We've been passed an object. We do lots of stuff with it
    # which then crashes mysteriously once in a blue moon, and 
    # you have to trace back to whatever set $object to {} in
    # in the first place
}

F

On Fri, Jul 13, 2007 at 10:50:41AM -0700, David Alban wrote:
> I'm curious.  In what situations would you like to have the ability to
> disable it?
> 
> On 7/13/07, Nicholas Clark <nick at ccl4.org> wrote:
> >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.
> 
> -- 
> Live in a world of your own, but always welcome visitors.
> 


More information about the london.pm mailing list