line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XT::Files::File; |
2
|
|
|
|
|
|
|
|
3
|
33
|
|
|
33
|
|
73264
|
use 5.006; |
|
33
|
|
|
|
|
121
|
|
4
|
33
|
|
|
33
|
|
174
|
use strict; |
|
33
|
|
|
|
|
61
|
|
|
33
|
|
|
|
|
813
|
|
5
|
33
|
|
|
33
|
|
173
|
use warnings; |
|
33
|
|
|
|
|
70
|
|
|
33
|
|
|
|
|
1554
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
8
|
|
|
|
|
|
|
|
9
|
33
|
|
|
33
|
|
682
|
use Class::Tiny 1 qw(name); |
|
33
|
|
|
|
|
2163
|
|
|
33
|
|
|
|
|
235
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use overload ( |
12
|
142
|
|
|
142
|
|
14422
|
q{""} => sub { shift->name }, |
13
|
3
|
|
|
3
|
|
1890
|
bool => sub () { return 1 }, |
14
|
33
|
|
|
|
|
320
|
fallback => 1, |
15
|
33
|
|
|
33
|
|
39120
|
); |
|
33
|
|
|
|
|
24299
|
|
16
|
|
|
|
|
|
|
|
17
|
33
|
|
|
33
|
|
2987
|
use Carp (); |
|
33
|
|
|
|
|
60
|
|
|
33
|
|
|
|
|
8654
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub BUILD { |
20
|
74
|
|
|
74
|
0
|
6895
|
my ( $self, $args ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
74
|
100
|
|
|
|
1670
|
Carp::croak 'name attribute required' if !defined $self->name; |
23
|
|
|
|
|
|
|
|
24
|
73
|
100
|
|
|
|
1219
|
$self->{_module} = $args->{is_module} ? 1 : q{}; |
25
|
73
|
100
|
|
|
|
188
|
$self->{_pod} = $args->{is_pod} ? 1 : q{}; |
26
|
73
|
100
|
|
|
|
203
|
$self->{_script} = $args->{is_script} ? 1 : q{}; |
27
|
73
|
100
|
|
|
|
213
|
$self->{_test} = $args->{is_test} ? 1 : q{}; |
28
|
|
|
|
|
|
|
|
29
|
73
|
|
|
|
|
159
|
return; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub is_module { |
33
|
47
|
|
|
47
|
0
|
24098
|
my ($self) = @_; |
34
|
|
|
|
|
|
|
|
35
|
47
|
100
|
|
|
|
311
|
return $self->{_module} ? 1 : q{}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub is_pod { |
39
|
45
|
|
|
45
|
0
|
98
|
my ($self) = @_; |
40
|
|
|
|
|
|
|
|
41
|
45
|
100
|
|
|
|
245
|
return $self->{_pod} ? 1 : q{}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub is_script { |
45
|
51
|
|
|
51
|
0
|
108
|
my ($self) = @_; |
46
|
|
|
|
|
|
|
|
47
|
51
|
100
|
|
|
|
262
|
return $self->{_script} ? 1 : q{}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub is_test { |
51
|
46
|
|
|
46
|
0
|
102
|
my ($self) = @_; |
52
|
|
|
|
|
|
|
|
53
|
46
|
100
|
|
|
|
235
|
return $self->{_test} ? 1 : q{}; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |