Re: "Watching" all variables in a specific namespace?

2004-10-11 Thread Gabor Szabo
On Sun, 10 Oct 2004, Yuval Yaari wrote:

> And more importantly, how can I watch array changes, hash changes, etc?

Not the perfect solution but for a specific simple array or
simple hash I'd put a watch on some expression that represents
the whole array or hash:

w join ":",@a

w join ":",%h


for more complex variables with some references as values you might
want to watch the serialized version of the variable.


Gabor
http://www.szabgab.com/


"Watching" all variables in a specific namespace?

2004-10-10 Thread Yuval Yaari
Hi,
I read Gabor's post about break-on-watch ( 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg00020.html ).
There are 2 issues that I wish to solve:
I didn't see an answer if it's even possible to break on a watch (Gabor, 
did you manage to do it?).
I am unable to "watch" arrays, hashes, and anonymous references (e.g: $a 
= \5;).
In other words, I am only able to watch normal scalars.

I am trying to build a -d: debugger that would tell me when variables in 
a specific name space (or all namespaces) are defined/changed, and to 
what value.
In the case of references, I will display a Data::Dumper output.
I know how to watch a specific variable, but how can I watch all of them?
And more importantly, how can I watch array changes, hash changes, etc?

Thanks.
 --Yuval