I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2012-01-19 08:22:16.728429-08 by wsppan
sub command dispatching confusion
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!
Direct Responses: 13610 | Write a response