line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Parse::Crontab::Entry; |
2
|
4
|
|
|
4
|
|
2096
|
use strict; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
174
|
|
3
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
125
|
|
4
|
4
|
|
|
4
|
|
1083
|
use utf8; |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
24
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
125
|
use Mouse; |
|
4
|
|
|
|
|
28
|
|
|
4
|
|
|
|
|
35
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has line => ( |
9
|
|
|
|
|
|
|
is => 'ro', |
10
|
|
|
|
|
|
|
isa => 'Str', |
11
|
|
|
|
|
|
|
required => 1, |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has line_number => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
isa => 'Int', |
17
|
|
|
|
|
|
|
required => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has is_error => ( |
21
|
|
|
|
|
|
|
is => 'rw', |
22
|
|
|
|
|
|
|
isa => 'Bool', |
23
|
|
|
|
|
|
|
default => undef, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has errors => ( |
27
|
|
|
|
|
|
|
is => 'rw', |
28
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
29
|
|
|
|
|
|
|
default => sub {[]}, |
30
|
|
|
|
|
|
|
auto_deref => 1, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has warnings => ( |
34
|
|
|
|
|
|
|
is => 'rw', |
35
|
|
|
|
|
|
|
isa => 'ArrayRef[Str]', |
36
|
|
|
|
|
|
|
default => sub {[]}, |
37
|
|
|
|
|
|
|
auto_deref => 1, |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
4
|
|
|
4
|
|
1782
|
no Mouse; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
18
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub set_error { |
43
|
4
|
|
|
4
|
0
|
36
|
my ($self, $error_msg) = @_; |
44
|
|
|
|
|
|
|
|
45
|
4
|
|
|
|
|
7
|
push @{$self->errors}, $error_msg; |
|
4
|
|
|
|
|
27
|
|
46
|
4
|
|
|
|
|
21
|
$self->is_error(1); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub error_message { |
50
|
4
|
|
|
4
|
0
|
5
|
my $self = shift; |
51
|
|
|
|
|
|
|
|
52
|
4
|
|
|
|
|
31
|
sprintf 'line: %d: %s | %s', $self->line_number, $self->line, join(' ', $self->errors); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub set_warning { |
56
|
4
|
|
|
4
|
0
|
9
|
my ($self, $warn_msg) = @_; |
57
|
|
|
|
|
|
|
|
58
|
4
|
|
|
|
|
3
|
push @{$self->warnings}, $warn_msg; |
|
4
|
|
|
|
|
31
|
|
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub warning_message { |
62
|
1
|
|
|
1
|
0
|
1
|
my $self = shift; |
63
|
|
|
|
|
|
|
|
64
|
1
|
|
|
|
|
13
|
sprintf 'line: %d: %s | %s', $self->line_number, $self->line, join(' ', $self->warnings); |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub has_warnings { |
68
|
11
|
|
|
11
|
0
|
568
|
my $self = shift; |
69
|
|
|
|
|
|
|
|
70
|
11
|
100
|
|
|
|
9
|
scalar @{$self->warnings} ? 1 : (); |
|
11
|
|
|
|
|
53
|
|
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |