lib/Set/Associate/NewKey/HashMD5.pm

filter: Statementstmt 96.5% 28 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 100% 1 / 1 totaltotal 94.8% 37 / 39 CC 1 SCAR 1.1
CC
1
Cov
97%
name
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« lib/Set/Associate/RefillItems/Shuffle.pm ↑ Summary lib/Set/Associate/NewKey/HashSHA1.pm »
1 4 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Set::Associate::NewKey::HashMD5;
6  
7 # ABSTRACT: Pick a value from the pool based on the MD5 value of the key
8  
9 4 our $VERSION = '0.004000';
10  
11 4 our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
12  
13 4 ▶use Moose qw( around extends );
Subroutine BEGIN: called CC=1 SCAR=0.0
14 4 ▶use Digest::MD5;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 4 ▶use bigint 0.22 qw( hex );
Subroutine BEGIN: called CC=1 SCAR=0.0
16 4 extends 'Set::Associate::NewKey::PickOffset';
17  
18  
19  
20  
21  
22  
23  
24 0 ▶sub name { 'hash_md5' }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
25 around get_assoc => sub {
26 14 ▶ my ( $orig, $self, $sa, $key ) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
27  
28 14 return $self->$orig( $sa, hex Digest::MD5::md5_hex($key) );
29 4 };
30  
31 4 __PACKAGE__->meta->make_immutable;
32  
33 4 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 4 1;
36  
37 __END__
38  
39 =pod
40  
41 =encoding UTF-8
42  
43 =head1 NAME
44  
45 Set::Associate::NewKey::HashMD5 - Pick a value from the pool based on the MD5 value of the key
46  
47 =head1 VERSION
48  
49 version 0.004000
50  
51 =head1 METHODS
52  
53 =head2 name
54  
55 The name of this key assignment method ( C<hash_md5> )
56  
57 =head1 AUTHOR
58  
59 Kent Fredric <kentnl@cpan.org>
60  
61 =head1 COPYRIGHT AND LICENSE
62  
63 This software is copyright (c) 2015 by Kent Fredric <kentfredric@gmail.com>.
64  
65 This is free software; you can redistribute it and/or modify it under
66 the same terms as the Perl 5 programming language system itself.
67  
68 =cut
« lib/Set/Associate/RefillItems/Shuffle.pm ↑ Summary lib/Set/Associate/NewKey/HashSHA1.pm »