>>>>> "JNP" == Joshua N Pritikin <[EMAIL PROTECTED]> writes:

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

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

then i am curious, what and how do you store the info for a watcher? if
not in the hash of $watcher, then what? a pseudohash? or closures?

but in any case, that is not clean OO coding and i won't do it. access
to the data attribute must be controled by a method.


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

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

is that documented? what prefix is allowed (any string)? i assume the
prefix is to avoid method name collisions. this is not cool OO coding
either IMO. i will write damian conway to see what he thinks about that
idea.

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

Reply via email to