On Sun, Jan 23, 2000 at 12:05:44PM -0500, [EMAIL PROTECTED] wrote:
>   JNP> What is wrong with this:
> 
>   JNP>   $watcher->{data} = ...; #?
> 
> that breaks the OO rules. one shoudl never assume knowledge about the
> internal stucture of an object. there should be a method/attribute for that.

But you can't access the internal structure of a watcher except via
methods. The hash part is entirely empty.

>   JNP> Yah, that's still a problem.
> 
> just add another method/attribute like you did with timeput_cb. no logic
> behind it just something to hold private data. this makes subclassing
> very easy.

You can also add methods with a prefix.  For example,

  package Event::Watcher;
  sub uri_data { ... }

-- 
"Never ascribe to malice that which can be explained by stupidity."
                            via, but not speaking for Deutsche Bank

Reply via email to