line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Find::Rule::Digest; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
43548
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
83
|
|
4
|
2
|
|
|
2
|
|
11
|
use vars qw($VERSION); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
130
|
|
5
|
|
|
|
|
|
|
$VERSION = 0.01; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
1833
|
use Digest; |
|
2
|
|
|
|
|
1163
|
|
|
2
|
|
|
|
|
49
|
|
8
|
2
|
|
|
2
|
|
1608
|
use FileHandle; |
|
2
|
|
|
|
|
26727
|
|
|
2
|
|
|
|
|
12
|
|
9
|
2
|
|
|
2
|
|
2892
|
use File::Find::Rule; |
|
2
|
|
|
|
|
17842
|
|
|
2
|
|
|
|
|
16
|
|
10
|
2
|
|
|
2
|
|
99
|
use base qw(File::Find::Rule); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
396
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
10
|
use vars qw(@EXPORT); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
492
|
|
13
|
|
|
|
|
|
|
@EXPORT = @File::Find::Rule::EXPORT; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
0
|
0
|
0
|
sub File::Find::Rule::md2 { _match_digest(shift, "MD2" => shift) } |
16
|
2
|
|
|
2
|
0
|
1712
|
sub File::Find::Rule::md5 { _match_digest(shift, "MD5" => shift) } |
17
|
0
|
|
|
0
|
0
|
0
|
sub File::Find::Rule::sha1 { _match_digest(shift, "SHA-1" => shift) } |
18
|
0
|
|
|
0
|
0
|
0
|
sub File::Find::Rule::hmac { _match_digest(shift, "HMAC" => shift) } |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _match_digest { |
21
|
2
|
|
|
2
|
|
15
|
my $self = shift->_force_object(); |
22
|
2
|
|
|
|
|
13
|
my($imp, $checksum) = @_; |
23
|
|
|
|
|
|
|
$self->exec( |
24
|
|
|
|
|
|
|
sub { |
25
|
6
|
|
|
6
|
|
7651
|
my $file = shift; |
26
|
6
|
|
|
|
|
32
|
my $digest = Digest->new($imp); |
27
|
6
|
|
|
|
|
182
|
$digest->addfile(FileHandle->new($file)); |
28
|
6
|
|
|
|
|
850
|
$digest->hexdigest eq $checksum; |
29
|
|
|
|
|
|
|
}, |
30
|
2
|
|
|
|
|
23
|
); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
__END__ |