hi joshua,
i have an idea we briefly covered a few weeks ago. i want a new
attribute on all watchers called data (or something else) which is just
used to hold whatever i want. then i could subclass event.pm and not
need to do this encapsulation stuff.
this still doesn't allow for autodestruction on leaving scope as you
have class level structures holding refs to the watcher objects. if you
returned a higher level object that contained the watcher info, then it
might be possible to get DESTROY called as only the creator code will
have a ref to this higher object.
i feel the user has to keep track of these higher level objects and not
event.pm. there is no reason to offer these class level things unless
they are requested. make them a subclass or sister/helper class and then
we get the autodestruct feature. probably too hard to do now, but what
do you think of it? does anyone use all_watchers or similar class level
calls?
just thinking out loud,
uri
--
Uri Guttman --------- [EMAIL PROTECTED] ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com