Remove me from the mailing list please

On Wednesday, April 27, 2011, Jeff Pang <jeffrp...@gmail.com> wrote:
> 2011/4/28 Uri Guttman <u...@stemsystems.com>:
>
>>
>> the _ prefix is the only common way to mark a private OR protected
>> method as perl doesn't directly provide any support for it. moose and
>> other OO systems may support this.
>
>
> I may think Perl OO (not moose) doesn't have private or protected
> methods as other languages like Java/Ruby.
> _method can be accessed from anywhere.
>
> package A;
>
> sub new { bless {},shift }
> sub _test { print 1 }
>
> package B;
>
> my $obj = A->new;
> $obj->_test;
>
>
> That works.
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to