Subject: | Moops intergration not working |
Date: | Tue, 04 Feb 2014 11:44:01 +0100 |
To: | bug-MooX-Cmd [...] rt.cpan.org |
From: | Sven Schober <sven.schober [...] uni-ulm.de> |
Hi!
I am using:
Moops is up to date. (0.030)
MooX::Cmd is up to date. (0.008)
I try to implement a command like so:
#!/usr/bin/env perl
use Modern::Perl '2014';
use Moops;
class MyApp {
use MooX::Cmd;
method execute( ArrayRef $args, ArrayRef $chain ){
warn "MyApp::execute() called";
}
}
package MyApp::Cmd;
use Moops;
class cmd1 {
use MooX::Cmd;
method execute( ArrayRef $args, ArrayRef $chain ){
warn "cmd1 execute called";
}
}
package main;
MyApp->new_with_cmd();
Which yields:
$ ./myapp.pl
Can't locate object method "new_with_cmd" via package "MyApp" at
./myapp.pl line 26.
Cheers
Sven
Message body not shown because it is not plain text.