Bump version and update Changes
[gruntmaster-data.git] / lib / Gruntmaster / App / Command / Rerun.pm
... / ...
CommitLineData
1package Gruntmaster::App::Command::Rerun;
2
3use 5.014000;
4use warnings;
5
6our $VERSION = '5999.000_016';
7
8use Gruntmaster::App '-command';
9use Gruntmaster::Data;
10use Scalar::Util qw/looks_like_number/;
11
12sub usage_desc { '%c rerun id...' }
13
14sub validate_args {
15 my ($self, $opt, $args) = @_;
16 my @args = @$args;
17 $self->usage_error('Not enough arguments') if @args < 1;
18}
19
20sub execute {
21 my ($self, $opt, $args) = @_;
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 }
32}
33
341;
35__END__
36
37=encoding utf-8
38
39=head1 NAME
40
41Gruntmaster::App::Command::Rerun - rerun some jobs and probles
42
43=head1 SYNOPSIS
44
45 gm rerun 123 124
46
47 gm rerun aplusb aminusb
48
49 gm rerun 12 aplusb
50
51=head1 DESCRIPTION
52
53The rerun command takes some IDs of jobs and problems and reruns them.
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
65Copyright (C) 2014-2016 by Marius Gavrilescu
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.008457 seconds and 4 git commands to generate.