| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Catmandu::Fix::File; |
|
2
|
1
|
|
|
1
|
|
711
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
39
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = "0.011"; |
|
4
|
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
427
|
use parent 'Exporter'; |
|
|
1
|
|
|
|
|
256
|
|
|
|
1
|
|
|
|
|
4
|
|
|
6
|
|
|
|
|
|
|
our @EXPORT; |
|
7
|
|
|
|
|
|
|
@EXPORT = qw( |
|
8
|
|
|
|
|
|
|
basename |
|
9
|
|
|
|
|
|
|
dirname |
|
10
|
|
|
|
|
|
|
file_size |
|
11
|
|
|
|
|
|
|
human_byte_size |
|
12
|
|
|
|
|
|
|
Condition::file_test |
|
13
|
|
|
|
|
|
|
); |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
foreach my $fix (@EXPORT) { |
|
16
|
|
|
|
|
|
|
eval <<EVAL; ## no critic |
|
17
|
|
|
|
|
|
|
require Catmandu::Fix::$fix; |
|
18
|
|
|
|
|
|
|
Catmandu::Fix::$fix ->import( as => '$fix' ); |
|
19
|
|
|
|
|
|
|
EVAL |
|
20
|
|
|
|
|
|
|
die "Failed to use Catmandu::Fix::$fix\n" if $@; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
|
25
|
|
|
|
|
|
|
__END__ |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Catmandu::Fix::File - Catmandu fixes to check file attributes |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=begin markdown |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# STATUS |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
[](https://travis-ci.org/LibreCat/Catmandu-Fix-File) |
|
36
|
|
|
|
|
|
|
[](https://coveralls.io/r/LibreCat/Catmandu-Fix-File) |
|
37
|
|
|
|
|
|
|
[](http://cpants.cpanauthors.org/dist/Catmandu-Fix-File) |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=end markdown |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
use Catmandu::Fix::File; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# all fix functions are exported by default |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Catmandu::Fix::File includes the following L<Catmandu::Fix> functions: |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=over |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L<Catmandu::Fix::basename> |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
L<Catmandu::Fix::dirname> |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
L<Catmandu::Fix::file_size> |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
L<Catmandu::Fix::human_byte_size> |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L<Catmandu::Fix::Condition::file_test> |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=back |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHOR |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Nicolas Franck, C<< <nicolas.franck at ugent.be> >> |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
82
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
|
83
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
See L<http://dev.perl.org/licenses/> for more information. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |