line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: DumpChecksum.pm 21415 2008-10-16 07:50:55Z daisuke $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package MooseX::WithCache::KeyGenerator::DumpChecksum; |
4
|
1
|
|
|
1
|
|
1446
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
5
|
1
|
|
|
1
|
|
7576
|
use Data::Dumper (); |
|
1
|
|
|
|
|
6687
|
|
|
1
|
|
|
|
|
25
|
|
6
|
1
|
|
|
1
|
|
8
|
use Digest::MD5 (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'MooseX::WithCache::KeyGenerator'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
4
|
no Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub generate { |
15
|
6
|
|
|
6
|
1
|
14
|
my ($self, $key) = @_; |
16
|
|
|
|
|
|
|
|
17
|
6
|
|
|
|
|
10
|
local $Digest::MD5::Indent = 0; |
18
|
6
|
|
|
|
|
10
|
local $Digest::MD5::Terse = 1; |
19
|
6
|
|
|
|
|
10
|
local $Digest::MD5::Sortkeys = 1; |
20
|
6
|
|
|
|
|
37
|
return Digest::MD5::md5_hex( Data::Dumper::Dumper($key) ); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
MooseX::WithCache::KeyGenerator::DumpChecksum - Generate MD5 Checksum Key From Complex Structure |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 METHODS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 generate |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |