X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Frgit.git;a=blobdiff_plain;f=lib%2FApp%2FRgit%2FCommand.pm;h=7410be77977afa88b94b165defe775c3b2b7982c;hp=b32095f8a581302093aacf6f0414123648e350e7;hb=f34c972acf43aff431228979855d39fbd7c52faf;hpb=77133fa5f1b24c06f00b3e3e4f45541973595d38 diff --git a/lib/App/Rgit/Command.pm b/lib/App/Rgit/Command.pm index b32095f..7410be7 100644 --- a/lib/App/Rgit/Command.pm +++ b/lib/App/Rgit/Command.pm @@ -42,7 +42,7 @@ __PACKAGE__->action($_ => 'Once') for qw/version help daemon init/, ' '; sub new { my ($class, %args) = &validate; my $cmd = $args{cmd}; - return unless defined $cmd; + $cmd = ' ' unless defined $cmd; my $action = $class->action($cmd); croak "Command $cmd shouldn't be executed as an $action" unless $class eq __PACKAGE__ or $class->isa($action);