line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Hash::MD5; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Hash::MD5 - MD5 checksum for choosen hashref |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Version 0.08 |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=cut |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = '0.08'; |
16
|
|
|
|
|
|
|
|
17
|
3
|
|
|
3
|
|
65835
|
use utf8; |
|
3
|
|
|
|
|
68
|
|
|
3
|
|
|
|
|
30
|
|
18
|
3
|
|
|
3
|
|
221
|
use 5.10.0; |
|
3
|
|
|
|
|
13
|
|
19
|
3
|
|
|
3
|
|
48
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
116
|
|
20
|
3
|
|
|
3
|
|
34
|
use warnings FATAL => 'all'; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
203
|
|
21
|
3
|
|
|
3
|
|
18
|
use Digest::MD5 qw(md5_hex); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
262
|
|
22
|
3
|
|
|
3
|
|
3524
|
use Data::Dumper; |
|
3
|
|
|
|
|
28118
|
|
|
3
|
|
|
|
|
206
|
|
23
|
3
|
|
|
3
|
|
24
|
use vars qw($VERSION @EXPORT_OK); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
575
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
require Exporter; |
26
|
|
|
|
|
|
|
*import = \&Exporter::import; |
27
|
|
|
|
|
|
|
@EXPORT_OK = qw(sum); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
use Hash::MD5 qw(sum); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
... |
34
|
|
|
|
|
|
|
my $hashref = {some => 'hashref'}; |
35
|
|
|
|
|
|
|
print sum( $hashref ), $/; |
36
|
|
|
|
|
|
|
... |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 sum |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub sum { |
45
|
46
|
|
|
46
|
1
|
15893
|
my ($param) = @_; |
46
|
46
|
100
|
|
|
|
112
|
my $arg = ( ref $param ne 'ARRAY' ) ? [$param] : $param; |
47
|
46
|
|
|
|
|
137
|
return md5_hex( Data::Dumper->new($arg)->Indent(0)->Terse(1)->Deparse(1)->Sortkeys(1)->Dump ); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; # End of Hash::MD5 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |