]> git.vpit.fr Git - perl/modules/rgit.git/commitdiff
Default policy is $status ? LAST : NEXT when the user haven't defined one
authorVincent Pit <vince@profvince.com>
Tue, 7 Oct 2008 18:37:22 +0000 (20:37 +0200)
committerVincent Pit <vince@profvince.com>
Tue, 7 Oct 2008 18:37:22 +0000 (20:37 +0200)
lib/App/Rgit/Command.pm

index f2f043bd05b0b65aed70e2a0607e9515a7e65268..0a29f096fb86184d3b0a952d1e0d4f805d6340ed 100644 (file)
@@ -85,7 +85,7 @@ sub action {
 sub report {
  my ($self) = @_;
  my $cb = $self->policy;
 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;
 }
  my $code = $cb->(@_);
  return defined $code ? $code : NEXT;
 }