line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Find::CaseCollide; |
2
|
|
|
|
|
|
|
$File::Find::CaseCollide::VERSION = '0.0.1'; |
3
|
2
|
|
|
2
|
|
74914
|
use strict; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
48
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
43
|
|
5
|
2
|
|
|
2
|
|
33
|
use 5.014; |
|
2
|
|
|
|
|
5
|
|
6
|
2
|
|
|
2
|
|
943
|
use File::Find::Object (); |
|
2
|
|
|
|
|
19796
|
|
|
2
|
|
|
|
|
42
|
|
7
|
2
|
|
|
2
|
|
872
|
use Moo; |
|
2
|
|
|
|
|
16889
|
|
|
2
|
|
|
|
|
8
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has '_results' => ( is => 'rw' ); |
10
|
|
|
|
|
|
|
has '_ffo' => ( is => 'rw' ); |
11
|
|
|
|
|
|
|
has 'dir' => ( is => 'ro' ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _iter |
14
|
|
|
|
|
|
|
{ |
15
|
145
|
|
|
145
|
|
193
|
my ($self) = @_; |
16
|
145
|
100
|
|
|
|
288
|
if ( my $r = $self->_ffo->next_obj() ) |
17
|
|
|
|
|
|
|
{ |
18
|
143
|
100
|
|
|
|
22370
|
if ( $r->is_dir() ) |
19
|
|
|
|
|
|
|
{ |
20
|
55
|
|
|
|
|
65
|
my %found; |
21
|
55
|
|
|
|
|
58
|
foreach my $fn ( @{ $self->_ffo->get_current_node_files_list() } ) |
|
55
|
|
|
|
|
112
|
|
22
|
|
|
|
|
|
|
{ |
23
|
141
|
|
|
|
|
5254
|
push @{ $found{ lc $fn } }, $fn; |
|
141
|
|
|
|
|
315
|
|
24
|
|
|
|
|
|
|
} |
25
|
55
|
|
|
|
|
386
|
my @positives = grep { @{ $found{$_} } > 1 } ( keys %found ); |
|
141
|
|
|
|
|
140
|
|
|
141
|
|
|
|
|
222
|
|
26
|
|
|
|
|
|
|
|
27
|
55
|
50
|
|
|
|
145
|
if (@positives) |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
$self->_results->{ $r->path() } = |
30
|
0
|
|
|
|
|
0
|
+{ map { $_ => $found{$_} } @positives }; |
|
0
|
|
|
|
|
0
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
} |
33
|
143
|
|
|
|
|
354
|
return 1; |
34
|
|
|
|
|
|
|
} |
35
|
2
|
|
|
|
|
294
|
return; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub find |
39
|
|
|
|
|
|
|
{ |
40
|
2
|
|
|
2
|
1
|
1075
|
my ($self) = @_; |
41
|
|
|
|
|
|
|
|
42
|
2
|
|
|
|
|
10
|
$self->_results( {} ); |
43
|
2
|
|
|
|
|
20
|
$self->_ffo( File::Find::Object->new( {}, $self->dir ) ); |
44
|
|
|
|
|
|
|
|
45
|
2
|
|
|
|
|
417
|
while ( $self->_iter ) |
46
|
|
|
|
|
|
|
{ |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
2
|
|
|
|
|
11
|
return $self->_results; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |