Re: RFC 188 (v1) Objects : Private keys and methods
[email protected] (Kenneth Lee) Sat, 02 Sep 2000 13:22:06 +0800
| Newsgroups | perl.perl6.language.objects |
|---|---|
| Message-ID | <[email protected]> |
> package Derived;
> use base 'Base';
>
> sub new {
> my ($class, $derdatum, @basedata) = @_;
> my $self = $class->SUPER::new(@basedata);
> private $self->{data} = $derdata;
^^^^^^^^
should be $derdatum here?
> return $self;
> }
>
> sub data { return $_[0]->{data} }; # Derived::data