Don't ask to ask, just ask | |
PerlMonks |
Re: Nested Dispatch Tables?by bobf (Monsignor) |
on Mar 24, 2008 at 04:48 UTC ( [id://675854]=note: print w/replies, xml ) | Need Help?? |
You can use any structure as a dispatch table (although they may not all fit the formal definition), including a HoH ($dispatch{$type}{$action} = $sub). A regular hash would work if you decided upon a method for concatenating params into a single string to use as a key ($dispatch{ $type . '_' . $action }). Perhaps I do not understand what you mean by a 'nested' dispatch table. Please elaborate if I'm missing the question.
In Section
Seekers of Perl Wisdom
|
|