line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::basename; |
2
|
2
|
|
|
2
|
|
1354
|
use Catmandu::Sane; |
|
2
|
|
|
|
|
230267
|
|
|
2
|
|
|
|
|
11
|
|
3
|
2
|
|
|
2
|
|
447
|
use Moo; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
9
|
|
4
|
2
|
|
|
2
|
|
423
|
use File::Basename qw(); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
27
|
|
5
|
2
|
|
|
2
|
|
928
|
use Catmandu::Fix::Has; |
|
2
|
|
|
|
|
1448
|
|
|
2
|
|
|
|
|
14
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Catmandu::Fix::SimpleGetValue'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub emit_value { |
12
|
1
|
|
|
1
|
0
|
5863
|
my ($self, $var) = @_; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
5
|
"${var} = File::Basename::basename(${var}) if is_string( ${var} );"; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Catmandu::Fix::basename - get file basename |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
basename('/path/to/file.jpg') |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 AUTHOR |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Nicolas Franck, C<< <nicolas.franck at ugent.be> >> |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SEE ALSO |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
L<Catmandu::Fix> |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |