in reply to Can anybody tell me how MooX::Cmd is supposed to work?
Can anybody tell me how MooX::Cmd is supposed to work?
The MANIFEST can, probably, lets see
MooX::Cmd -> http://search.cpan.org/dist/MooX-Cmd/MANIFEST
t/01-simple.t
t/lib/FirstTestApp.pm...
If you know what @ARGV is and read MooX::Cmd you can see that "myapp.pl command command" is supposed to call sub execute in module MyApp::Cmd::Command::Cmd::Command
myapp.pl would be use MyApp; MyApp->new_with_cmd;
But if you try it out, you'll see that it only calls sub MyApp::execute
http://deps.cpantesters.org/depended-on-by.pl?dist=MooX-Cmd-0.002 shows an example duckpan which has App::DuckPAN->new_with_cmd; and App::DuckPAN::Cmd
sub execute { my ( $self, $args, $chain ) = @_; my $app = shift @{$chain}; $self->app($app); $self->run(@{$args}); }
but its completely different.
So sorry, I don't know how MooX::Cmd is supposed to work, and neither does its documentation
|
|---|