Can this still be written in one line, without intermediate variable $mref?
$self->get_mref->($self, @args);
or make get_mref return a code reference that captured $self so you can omit it when calling it.
sub get_mref { my ($self) = @_; my $coderef = \&some_method; return sub { $self->$coderef(@_) }; } $self->get_mref->(@args);
In reply to Re^3: method dispatch question
by rafl
in thread method dispatch question
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |