Re: data() problems

[email protected] (Graham Barr)
Newsgroups perl.loop
Message-ID <[email protected]>
On Thu, Apr 20, 2000 at 06:52:29PM -0400, Uri Guttman wrote:
> >>>>> "JNP" == Joshua N Pritikin <[email protected]> writes:
> 
>   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.

That would defeat the object of the private data. The method is designed
so that sub-classes do not need to pass a key.

I think two methods is the way to go.

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