line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::file_size; |
2
|
2
|
|
|
2
|
|
1040
|
use Catmandu::Sane; |
|
2
|
|
|
|
|
109349
|
|
|
2
|
|
|
|
|
12
|
|
3
|
2
|
|
|
2
|
|
357
|
use Moo; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
8
|
|
4
|
2
|
|
|
2
|
|
873
|
use Catmandu::Fix::Has; |
|
2
|
|
|
|
|
651
|
|
|
2
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Catmandu::Fix::SimpleGetValue'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub emit_value { |
11
|
1
|
|
|
1
|
0
|
6501
|
my ($self, $var) = @_; |
12
|
1
|
|
|
|
|
5
|
"${var} = is_string(${var}) && -f ${var} ? (-s ${var}) : 0;"; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Catmandu::Fix::file_size - get file size |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
file_size('/path/to/file.jpg') |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 AUTHOR |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Nicolas Franck, C<< <nicolas.franck at ugent.be> >> |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 SEE ALSO |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
L<Catmandu::Fix> |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |