Permalink
Browse files

Follow last App::Cmd updates

* Rename $cmd->run to $cmd->execute in docs and tests
* Require App::Cmd 0.300
  • Loading branch information...
1 parent ed791b1 commit ce9cd6f1f19692766afe97906a66b2db3ec4f5c5 @vovkasm vovkasm committed Sep 6, 2009
View
@@ -12,7 +12,7 @@ WriteMakefile(
PL_FILES => {},
PREREQ_PM => {
'Test::use::ok' => 0,
- 'App::Cmd' => 0,
+ 'App::Cmd' => 0.3,
'Moose' => 0.86,
'MooseX::Getopt' => "0.18",
'Getopt::Long::Descriptive' => 0,
View
@@ -65,7 +65,7 @@ See L<App::Cmd/SYNOPSIS>.
documentation => "recheck all results",
);
- sub run {
+ sub execute {
my ( $self, $opt, $args ) = @_;
# you may ignore $opt, it's in the attributes anyway
@@ -91,7 +91,7 @@ MooseX::App::Cmd::Command - Base class for L<MooseX::Getopt> based L<App::Cmd::C
required => 1,
);
- sub run {
+ sub execute {
my ( $self, $opts, $args ) = @_;
print $self->option_field; # also available in $opts->{option_field}
@@ -19,7 +19,7 @@ has 'moo' => (
documentation => "required option field",
);
-sub run {
+sub execute {
my ($self, $opt, $arg) =@_;
die ("cows go " . join(' ', $self->moo));
@@ -16,7 +16,7 @@ has wow => (
documentation => "required option field",
);
-sub run {
+sub execute {
my ($self, $opt, $arg) =@_;
die "my dog name barks " . $self->wow . "\n";
@@ -22,7 +22,7 @@ has widget => (
documentation => "set widget name",
);
-sub run {
+sub execute {
my ($self, $opt, $arg) =@_;
die "the widget name is " . $self->widget . " - @$arg\n";
@@ -9,7 +9,7 @@ Test::MyCmd::Command::justusage - it just dies its own usage, no matter what
=cut
-sub run {
+sub execute {
my ($self, $opt, $arg) = @_;
die $self->usage->text;

0 comments on commit ce9cd6f

Please sign in to comment.