in reply to Re^2: method dispatch question
in thread method dispatch question

Even if there is a solution for that (and I don't doubt there is one, perl is full of surprising syntax ;-), you shouldn't go for it, because it's not really readable anymore.

Use a temporary variable instead.

$self->($self->get_mref(...))() won't work because $something->(...) treats $something as a sub ref. If there's a way, I suspect it involves ${...}.

Replies are listed 'Best First'.
Re^4: method dispatch question
by rhesa (Vicar) on Jul 09, 2008 at 12:41 UTC
    I think $self->${ \ $self->get_mref(...) }(...) would work, but I agree with you about the readability.