ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pdk
pdk
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved