line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Path::Extended::Class::File; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
35
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
88
|
|
4
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
92
|
|
5
|
3
|
|
|
3
|
|
17
|
use base qw( Path::Extended::File ); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
1643
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub _initialize { |
8
|
39
|
|
|
39
|
|
115
|
my ($self, @args) = @_; |
9
|
|
|
|
|
|
|
|
10
|
39
|
|
|
|
|
400
|
my $file = File::Spec->catfile( @args ); |
11
|
39
|
|
|
|
|
237
|
$self->_set_path($file); |
12
|
39
|
|
|
|
|
92
|
$self->{is_dir} = 0; |
13
|
39
|
|
|
|
|
72
|
$self->{_compat} = 1; |
14
|
|
|
|
|
|
|
|
15
|
39
|
|
|
|
|
166
|
$self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new_foreign { |
19
|
0
|
|
|
0
|
1
|
0
|
my ($class, $type, @args) = @_; |
20
|
0
|
|
|
|
|
0
|
$class->new(@args); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub absolute { |
24
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
25
|
0
|
|
|
|
|
0
|
$self->{_base} = undef; |
26
|
0
|
|
|
|
|
0
|
$self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub relative { |
30
|
5
|
|
|
5
|
1
|
16
|
my $self = shift; |
31
|
5
|
50
|
|
|
|
27
|
my $base = @_ % 2 ? shift : undef; |
32
|
5
|
|
|
|
|
14
|
my %options = @_; |
33
|
5
|
|
33
|
|
|
28
|
$self->{_base} = $base || $options{base} || File::Spec->curdir; |
34
|
5
|
|
|
|
|
20
|
$self; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
6
|
|
|
6
|
1
|
1181
|
sub dir { shift->parent } |
38
|
0
|
|
|
0
|
1
|
0
|
sub volume { shift->parent->volume } |
39
|
1
|
|
|
1
|
1
|
2
|
sub cleanup { shift } # is always clean |
40
|
12
|
|
|
12
|
1
|
65
|
sub as_foreign { shift } # does nothing |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |