Re: var watchers restricted?

[email protected] (Joshua N Pritikin)
Newsgroups perl.loop
Message-ID <[email protected]>
On Tue, Feb 08, 2000 at 04:21:01PM +0100, [email protected] wrote:
> are there limitations in the type of variables or accesses var watchers
> can check?

In a word, yes.

> I tried to watch the deletion of a hash element. This did not work
> regardless if I watched the complete hash or the element itself.

I think it might work in the latest dev snapshot.

> If I watch a complete hash, element modifications are not recognized.

Correct.

> If I watch an array element, assignments are recognized, but if I assign
> via push(), this is ignored.

Hm.

> If I watch an array completely, Event reports an exception if I access
> the array by push(). This case is activated in the attached hack.

It sounds like I need to add a filter to restrict var watchers to plain
vanilla scalars.  Do you need more flexibility than that?

-- 
"Never ascribe to malice that which can be explained by stupidity."
                            via, but not speaking for Deutsche Bank
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.