"In Perl it is not possible to create a private function like in Java or C++."
It's not especially difficult...
sub my_function { croak "my_function is private" unless caller(0) eq __PACKAGE__; # body of function goes here }
MooseX::Privacy makes creating private and protected methods really easy (if you're already using Moose).
In reply to Re: 20 most important Perl Best Practices
by tobyink
in thread 20 most important Perl Best Practices
by greengaroo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |