diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-06-29 13:36:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-06-29 13:36:22 +0000 |
commit | f36deffb742a8d801280606006807f2ad95f3849 (patch) | |
tree | 06502c46a3112662abdac58a855abaa900e4c122 /lib/Youri/Submit/Check/Tag.pm | |
parent | 30e5f11dbc78f154d8a8a4d4dd93af39fd223cd0 (diff) | |
download | mga-youri-submit-f36deffb742a8d801280606006807f2ad95f3849.tar mga-youri-submit-f36deffb742a8d801280606006807f2ad95f3849.tar.gz mga-youri-submit-f36deffb742a8d801280606006807f2ad95f3849.tar.bz2 mga-youri-submit-f36deffb742a8d801280606006807f2ad95f3849.tar.xz mga-youri-submit-f36deffb742a8d801280606006807f2ad95f3849.zip |
prepare mergetopic/mdv-to-merge
Diffstat (limited to 'lib/Youri/Submit/Check/Tag.pm')
-rw-r--r-- | lib/Youri/Submit/Check/Tag.pm | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/lib/Youri/Submit/Check/Tag.pm b/lib/Youri/Submit/Check/Tag.pm deleted file mode 100644 index 3fadfa3..0000000 --- a/lib/Youri/Submit/Check/Tag.pm +++ /dev/null @@ -1,61 +0,0 @@ -# $Id$ -package Youri::Submit::Check::Tag; - -=head1 NAME - -Youri::Submit::Check::Tag - Incorrect tag values check - -=head1 DESCRIPTION - -This check plugin rejects packages with incorrect tag values, based on regular -expressions. - -=cut - -use warnings; -use strict; -use Carp; -use base qw/Youri::Submit::Check/; - -sub _init { - my $self = shift; - my %options = ( - tags => undef, # expected tag values - @_ - ); - - croak "no tags to check" unless $options{tags}; - croak "tag should be an hashref" unless ref $options{tags} eq 'HASH'; - - $self->{_tags} = $options{tags}; -} - -sub run { - my ($self, $package, $repository, $target, $define) = @_; - croak "Not a class method" unless ref $self; - - my @errors; - - foreach my $tag (keys %{$self->{_tags}}) { - my $value = $package->get_tag($tag); - if ($value !~ /$self->{_tags}->{$tag}/) { - push( - @errors, - "invalid value $value for tag $tag" - ); - } - } - - return @errors; - -} - -=head1 COPYRIGHT AND LICENSE - -Copyright (C) 2002-2006, YOURI project - -This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. - -=cut - -1; |