in reply to non-autovivifing hash
A debugger could be enhanced with an object that could provide this level of checking. This debugging object would contain a pointer to a variable whose autovivification is being monitored. Perl's debugger hooks could check autovivification constraints on a line-by-line basis at run-time. After the program starts working, the run-time checking could easily be turned off.
This is the sort of problem that I have trouble debugging with print statements, but I can easily debug with the ptkdb debugger. I just put the hash in the watch variable window and see how it grows. Or, if the data structure being monitored is too large, I put something like scalar(keys %myhash) in the watch window.
I've already been flamed each time that I have mentioned debuggers, so maybe we can skip that part this time!
It should work perfectly the first time! - toma
|
|---|