diff options
Diffstat (limited to 'lib/Youri/Submit/Check/Recency.pm')
-rw-r--r-- | lib/Youri/Submit/Check/Recency.pm | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/Youri/Submit/Check/Recency.pm b/lib/Youri/Submit/Check/Recency.pm index 58452a6..40e34e8 100644 --- a/lib/Youri/Submit/Check/Recency.pm +++ b/lib/Youri/Submit/Check/Recency.pm @@ -1,9 +1,9 @@ # $Id$ -package Youri::Upload::Check::Recency; +package Youri::Submit::Check::Recency; =head1 NAME -Youri::Upload::Check::Recency - Release check against current target +Youri::Submit::Check::Recency - Release check against current target =head1 DESCRIPTION @@ -15,26 +15,33 @@ exists for current upload target. use warnings; use strict; use Carp; -use base qw/Youri::Upload::Check/; +use base qw/Youri::Submit::Check/; sub run { my ($self, $package, $repository, $target, $define) = @_; croak "Not a class method" unless ref $self; + my @errors; + my $file = $repository->get_install_file($package, $target, $define); if (-f $file) { - $self->{_error} = "Current revision of package $file already exists for $target"; - return 0; + push( + @errors, + "Current revision already exists for $target" + ); } my @newer_revisions = $repository->get_newer_revisions($package, $target, $define); if (@newer_revisions) { - $self->{_error} = "Newer revisions of package $package already exists for $target: " . join(', ', @newer_revisions); - return 0; + push( + @errors, + "Newer revisions already exists for $target: " . + join(', ', @newer_revisions) + ); } - return 1; + return @errors; } =head1 COPYRIGHT AND LICENSE |