in reply to local vs. $self-> pointer to subroutine
my $func_Ref = \&$self->isInst; $self->$func_Ref( ... );
see OOP: Obj->Coderef for calling Private Methods for details.
Cheers Rolf
PS: But I'm not sure if the performance win does worth it. AFAIK Perl does a lot of optimization like method caching to speed things up.
UPDATE: typo fixed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: local vs. $self-> pointer to subroutine
by Anonymous Monk on May 23, 2011 at 18:36 UTC | |
by LanX (Saint) on May 23, 2011 at 19:57 UTC | |
by Anonymous Monk on May 23, 2011 at 20:32 UTC | |
by LanX (Saint) on May 23, 2011 at 20:48 UTC | |
by Anonymous Monk on May 24, 2011 at 01:02 UTC |