RE: The woes of auto-vivification exacerbated by the debugger...
by Jan Dubois other posts by this author
Mar 4 2008 12:04PM messages near this date
The woes of auto-vivification exacerbated by the debugger...
|
Re: The woes of auto-vivification exacerbated by the debugger...
On Tue, 04 Mar 2008, Kenneth Ã?lwing wrote:
> I suppose the question goes to ActiveState (mostly Jan I guess :-), do
> you agree that this should be termed a debugger bug? It is a sort of an
> unexpected/unwanted side-effect...If so, should I file a bug report or
> is this post enough?
Yes, please file a bug for it. I don't think we can fix it in the
general case: if you display "$ref-> {x}->{y}" in a watch window /
tooltip / whatever, then it will autovivify both the {x} entry, if it
didn't exist, and then the {y} entry inside the {x} hash.
I think we can add a check that tests that defined($ref-> {x}->{y})
returns true before retrieving the value, but even that expression will
autovivify the {x} hash, just not the {y} one:
C:\> perl -MData::Dump=dump -we"defined $a->{x}->{y} or print dump $a"
{ x => {} }
But maybe the tooltips and proximity watcher won't pick up multiple
levels of references anyways, so this may not matter.
Cheers,
-Jan
_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
kenneth
Jan Dubois
kenneth
|