line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Boxer::Task; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding UTF-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=cut |
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
2432
|
use v5.14; |
|
4
|
|
|
|
|
12
|
|
8
|
4
|
|
|
4
|
|
19
|
use utf8; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
26
|
|
9
|
4
|
|
|
4
|
|
106
|
use Role::Commons -all; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
29
|
|
10
|
4
|
|
|
4
|
|
6102
|
use namespace::autoclean 0.16; |
|
4
|
|
|
|
|
61
|
|
|
4
|
|
|
|
|
20
|
|
11
|
4
|
|
|
4
|
|
237
|
use autodie; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
29
|
|
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
18698
|
use Moo; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
33
|
|
14
|
4
|
|
|
4
|
|
1680
|
use MooX::StrictConstructor; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
28
|
|
15
|
|
|
|
|
|
|
with qw( MooX::Role::Logger Boxer::Role::Interact ); |
16
|
|
|
|
|
|
|
|
17
|
4
|
|
|
4
|
|
3335
|
use strictures 2; |
|
4
|
|
|
|
|
26
|
|
|
4
|
|
|
|
|
147
|
|
18
|
4
|
|
|
4
|
|
685
|
no warnings "experimental::signatures"; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
272
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 VERSION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Version v1.4.3 |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
our $VERSION = "v1.4.3"; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This is the base class for L tasks. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Tasks coerce, validate, and process application commands. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Currently implemented tasks: |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=over 4 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item * |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
L |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=item * |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
L |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item * |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
L |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=back |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 IDEAS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Tasks are separated from commands |
56
|
|
|
|
|
|
|
to allow for different front-end interfaces, |
57
|
|
|
|
|
|
|
even if currently only a single command-line tool is provided. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 wrappers |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Might be useful to provide wrappers for existing command-line tools, |
62
|
|
|
|
|
|
|
preserving full behavior of the underlying tool |
63
|
|
|
|
|
|
|
only extending it with relevant boxer options. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Examples: |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=over 4 |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item * |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
C |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=back |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 web |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Would be cool to offer a web service |
78
|
|
|
|
|
|
|
where you could request a customized system image |
79
|
|
|
|
|
|
|
to be generated for you on demand. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 AUTHOR |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Jonas Smedegaard C<< >>. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:JONASS'; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Copyright © 2013-2016 Jonas Smedegaard |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
94
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTIES |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
99
|
|
|
|
|
|
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
100
|
|
|
|
|
|
|
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=cut |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
1; |