Re: data() problems

[email protected] (Joshua N Pritikin)
Newsgroups perl.loop
Message-ID <[email protected]>
On Thu, Apr 20, 2000 at 06:52:29PM -0400, [email protected] wrote:
>   JNP> On Thu, Apr 20, 2000 at 02:22:25PM +0100, [email protected] wrote:
> 
>   >> In otherwords there should be two methods. One for the user, say
>   >> data(), and one for sub-classes that want to ensure data integrity,
>   >> say private_data()
> 
> couldn't the method names be the same and the constructor use a special key
> to save the data? then the primary watcher would have access to that
> with the data method and any subclassed ones would work fine too.
> 
>   JNP> Shall I add a note in Event.pod mentioning that data() is meant
>   JNP> only for implementors of event watchers?
> 
> i beg to differ. i had no intentions of subclassing watchers and i wanted
> the data method. it should be handled at the constructor level as well,
> either via graham's multiple methods or my scheme (if it works).

How about if I rename the new implementation of data() to private(),
and then reimplement data() without the fancy caller() trick?  Would
that satisfy all parties?

-- 
"May the best description of competition prevail."
          via, but not speaking for Deutsche Bank
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.