line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Find::Rule::Type; |
2
|
3
|
|
|
3
|
|
90828
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
115
|
|
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
2914
|
use File::Find::Rule; |
|
3
|
|
|
|
|
32762
|
|
|
3
|
|
|
|
|
30
|
|
5
|
3
|
|
|
3
|
|
264
|
use base qw( File::Find::Rule ); |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
532
|
|
6
|
3
|
|
|
3
|
|
17
|
use vars qw( $VERSION @EXPORT ); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
255
|
|
7
|
|
|
|
|
|
|
@EXPORT = @File::Find::Rule::EXPORT; |
8
|
|
|
|
|
|
|
$VERSION = '0.05'; |
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
4908
|
use File::Type; |
|
3
|
|
|
|
|
99688
|
|
|
3
|
|
|
|
|
248
|
|
11
|
3
|
|
|
3
|
|
44
|
use Text::Glob qw(glob_to_regex); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1040
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub File::Find::Rule::type { |
14
|
5
|
|
|
5
|
0
|
5360
|
my $self = shift()->_force_object; |
15
|
5
|
50
|
|
|
|
39
|
my @patterns = map { ref $_ ? $_ : glob_to_regex $_ } @_; |
|
5
|
|
|
|
|
36
|
|
16
|
5
|
|
|
|
|
932
|
my $ft = new File::Type; |
17
|
|
|
|
|
|
|
$self->exec( sub { |
18
|
65
|
|
|
65
|
|
6183
|
my $type = $ft->checktype_filename($_); |
19
|
65
|
100
|
|
|
|
35026
|
for (@patterns) { return 1 if $type =~ m/$_/ } |
|
65
|
|
|
|
|
750
|
|
20
|
53
|
|
|
|
|
1480
|
return; |
21
|
5
|
|
|
|
|
85
|
} ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |