X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Frgit.git;a=blobdiff_plain;f=lib%2FApp%2FRgit%2FCommand.pm;h=cf58e94b80e8f241a00ecdccb101221d80686a1a;hp=f2f043bd05b0b65aed70e2a0607e9515a7e65268;hb=5578058510412fff726cb88b2c78075c43c59303;hpb=e267749b5294c865fa9584c6f15bb0af85e24e30 diff --git a/lib/App/Rgit/Command.pm b/lib/App/Rgit/Command.pm index f2f043b..cf58e94 100644 --- a/lib/App/Rgit/Command.pm +++ b/lib/App/Rgit/Command.pm @@ -85,7 +85,7 @@ sub action { sub report { my ($self) = @_; my $cb = $self->policy; - return NEXT | SAVE unless $cb; + return $_[3] ? LAST : NEXT unless $cb; my $code = $cb->(@_); return defined $code ? $code : NEXT; } @@ -101,8 +101,7 @@ Accessors. =head2 C Runs the command with a L configuration object. -Stops as soon as one of the executed commands fails, and returns the corresponding exit code. -Returns zero when all went fine. +Handles back the code to return to the system and the last policy. Implemented in subclasses. =head1 SEE ALSO