Thanks!
After sending my question I found in a website the topic of 'private' methods,
and shows code like this:
my $method_name = sub {
my $this = shift;
_blablabla_
};
And to access it :
$this->$method_name("Arg1");
Now, this it really works for 'private' methods?
Thanks!
--
Pablo Fischer Sandoval (pablo@no-spam
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt
Pablo Fischer wrote:
> Thanks!
>
> After sending my question I found in a website the topic of 'private' methods,
> and shows code like this:
>
> my $method_name = sub {
> my $this = shift;
>
> _blablabla_
> };
>
> And to access it :
>
> $this->$method_name("Arg1");
>
> Now, this it really works for 'private' methods?
>
Perl has no private methods. Only polite conventions concerning which methods
should be called from outside the pm file. One way to communicate this is simply
to document only public methods using the emedded donumentation format, and use
standard comments for any necessary explanation of internal methods.
Joseph