|
I understand how the app dispatches to the correct command via the command_map dispatch table but where is the dispatch table for the command's subcommands?
In package My::Queue:
sub command_map {
console => 'CLI::Framework::Command::Console',
alias => 'CLI::Framework::Command::Alias',
'cmd-list' => 'CLI::Framework::Command::List',
enqueue => 'My::Queue::Command::Enqueue',
dequeue => 'My::Queue::Command::Dequeue',
print => 'My::Queue::Command::Print',
property => 'My::Queue::Command::Property',
}
in My::Queue::Command::Property:
sub subcommand_alias {
l => 'list',
s => 'set',
}
How does the app know that subcommands list and set get dispatched to My::Queue::Command::Property::List and My::Queue::Command::Property::Set?
Does the app just look for a class that inherits from My::Queue::Command::Property with a name that matches /[Ss]et/ or /[Ll]ist/ ?
Thanks in advance for your help!
|