]> iEval git - gruntmaster-data.git/blame - lib/Gruntmaster/App/Command/Rerun.pm
Added rerun_problem and improved gm rerun
[gruntmaster-data.git] / lib / Gruntmaster / App / Command / Rerun.pm
CommitLineData
92f74061
MG
1package Gruntmaster::App::Command::Rerun;
2
3use 5.014000;
4use warnings;
5
add75bf5 6our $VERSION = '5999.000_015';
92f74061
MG
7
8use Gruntmaster::App '-command';
9use Gruntmaster::Data;
9baaf76b 10use Scalar::Util qw/looks_like_number/;
92f74061 11
9baaf76b 12sub usage_desc { '%c rerun id...' }
92f74061
MG
13
14sub validate_args {
15 my ($self, $opt, $args) = @_;
16 my @args = @$args;
9baaf76b 17 $self->usage_error('Not enough arguments') if @args < 1;
92f74061
MG
18}
19
20sub execute {
21 my ($self, $opt, $args) = @_;
9baaf76b
S
22 my @args = @$args;
23
24 for my $obj (@args) {
25 if (looks_like_number $obj) {
26 rerun_job $obj;
27 }
28 else {
29 rerun_problem $obj;
30 }
31 }
92f74061
MG
32}
33
341;
35__END__
63afa40a
MG
36
37=encoding utf-8
38
39=head1 NAME
40
9baaf76b 41Gruntmaster::App::Command::Rerun - rerun some jobs and probles
63afa40a
MG
42
43=head1 SYNOPSIS
44
9baaf76b
S
45 gm rerun 123 124
46
47 gm rerun aplusb aminusb
48
49 gm rerun 12 aplusb
63afa40a
MG
50
51=head1 DESCRIPTION
52
9baaf76b 53The rerun command takes some IDs of jobs and problems and reruns them.
63afa40a
MG
54
55=head1 SEE ALSO
56
57L<gm>
58
59=head1 AUTHOR
60
61Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
62
63=head1 COPYRIGHT AND LICENSE
64
e1b9f3dd 65Copyright (C) 2014-2015 by Marius Gavrilescu
63afa40a
MG
66
67This library is free software; you can redistribute it and/or modify
68it under the same terms as Perl itself, either Perl version 5.20.1 or,
69at your option, any later version of Perl 5 you may have available.
70
71
72=cut
This page took 0.032794 seconds and 4 git commands to generate.