Re: var watchers restricted?

[email protected] (Graham Barr)
Newsgroups perl.loop
Message-ID <[email protected]>
On Tue, Feb 08, 2000 at 12:04:36PM -0500, Joshua Pritikin wrote:
> On Tue, Feb 08, 2000 at 05:51:14PM +0100, [email protected] wrote:
> > > > > If I watch a complete hash, element modifications are not recognized.
> > > >
> > > > Correct.
> > >
> > > The is because you are modifying the SV held in that element. Perl does
> > > not consider this a modification to the hash itself.
> > 
> > Ah ... I see. But what about delete() (and adding a new element)? scalar(%hash)
> > changes, does this indicate Perl considers THIS a modification?
> 
> Based on a cursory review of hv.c, I'd say that PL_vtbl_uvar is not
> supported in general.  It almost sounds like you need a tied hash...?

Correct, U magic only works on SV's

Graham.
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.