in reply to dynamic method creation, dispatch table or pseudo methods?
thanks for the suggestions, even if I really got no answers :)
I received, from another source I consider affordable, if not authoritative, the confirmation that what I called pseudo-method is a perfectly viable design. They called it dispatch table for a known invocant and they told me I can also write them as: my $code = $self->{$wanted_command}; $self->$code(@whole_data) to appears similar to a real method call. Personally I prefere my first syntax as I find it more explicit.
Added for the posterity.
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: dynamic method creation, dispatch table or pseudo methods?
by LanX (Saint) on Apr 20, 2021 at 20:49 UTC |