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.