On Thu, 28 Apr 2011 13:21:56 +0800, Jeff Pang wrote:
> 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.

In your example, yes.  But Moose *is* Perl's O-O, it's just a wrapper
around it.  Perl provides enough flexibility to do all kinds of things. 
See  http://search.cpan.org/perldoc?MooseX::Privacy.  (That's Moose-X, 
not Moo-Sex.)  Class::Std can do this too.

-- 
Peter Scott
http://www.perlmedic.com/     http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274
http://www.oreillyschool.com/courses/perl3/

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