Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: dynamic method creation, dispatch table or pseudo methods?

by Discipulus (Abbot)
on Apr 20, 2021 at 20:33 UTC ( #11131522=note: print w/replies, xml ) Need Help??


in reply to dynamic method creation, dispatch table or pseudo methods?

hello,

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*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: dynamic method creation, dispatch table or pseudo methods?
by LanX (Sage) on Apr 20, 2021 at 20:49 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11131522]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2021-10-18 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (72 votes). Check out past polls.

    Notices?