aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Youri/Submit/Reject/Clean.pm
blob: b191c723a1391c818f1bc21c0d62adba58cb84b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $Id: /local/youri/soft/trunk/lib/Youri/Submit/Action/Backup.pm 867 2006-01-29T20:47:27.830648Z guillaume  $
package Youri::Submit::Reject::Clean;

=head1 NAME

Youri::Submit::Action::Clean - Old revisions cleanup

=head1 DESCRIPTION

This action plugin ensures cleanup of old package revisions.

=cut

use warnings;
use strict;
use Carp;
use base qw/Youri::Submit::Reject/;

sub run {
    my ($self, $package, $errors, $repository, $target, $define) = @_;
    croak "Not a class method" unless ref $self;

    my $file = $package->get_file();
    print "deleting file $file\n" if $self->{_verbose};
    unlink $file unless $self->{_test};
}

=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