From: Vincent Pit Date: Tue, 7 Oct 2008 18:37:22 +0000 (+0200) Subject: Default policy is $status ? LAST : NEXT when the user haven't defined one X-Git-Tag: v0.04~9 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Frgit.git;a=commitdiff_plain;h=65e3405b02f27293a2f943b39d963f95d1f76192 Default policy is $status ? LAST : NEXT when the user haven't defined one --- diff --git a/lib/App/Rgit/Command.pm b/lib/App/Rgit/Command.pm index f2f043b..0a29f09 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; }