From: Roland G. <Rol...@al...> - 2000-08-03 14:54:44
|
John Porter wrote: > Although it does not implement persistence itself, my module > Tie::MultiDim (on CPAN) could be layered on top of a persistifying > hash such as MLDBM's. > > Tie::MultiDim flattens all nested structure accesses down to a > single-level hash; the key is composed with $; -- ICYWTK. Hmm, that would only work for a HoH structure, not for an arbitrary structure. Thanks, anyway. What I had in mind is some way to get notified if some key gets fetched for modification of some low-level data. When I write $tiedObj{first_level}[$second_level] = $value; with MLDBM, `first_level' is fetched, i.e. read from DB and unfrozen, then passed to Perl as an anonymous hash, which in turn modifies `second_level' and then happily discards the anon hash. Of course, MLDBM could remember the fetch of `first_level', but has no way to know if some structure below got modified. So, anybody got an idea? Could a debugger hook be used somehow? What about building the whole data structure with tied objects? <shudder> Roland -- Rol...@al... Phone: +43-1-27722-3755 ALCATEL Austria, Dept. RTPM FAX: +43-1-27722-3955 Scheydgasse 41, A-1210 WIEN, Austria (no Kangaroos here!) |