File Coverage

lib/Digest/xxHash.pm
Criterion Covered Total %
statement 19 19 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 2 2 100.0
total 29 29 100.0


line stmt bran cond sub pod time code
1             package Digest::xxHash;
2 1     1   17168 use strict;
  1         1  
  1         23  
3 1     1   3 use base qw(Exporter);
  1         1  
  1         74  
4 1     1   4 use Config ();
  1         3  
  1         11  
5 1     1   2 use XSLoader;
  1         1  
  1         14  
6 1     1   2 use Math::Int64 qw[int64_to_hex];
  1         1  
  1         3  
7             BEGIN {
8 1     1   89 our $VERSION = '2.03';
9 1         371 XSLoader::load __PACKAGE__, $VERSION;
10             }
11            
12             our @EXPORT_OK = qw[xxhash32 xxhash32_hex
13             xxhash64 xxhash64_hex];
14            
15 1     1 1 1069 sub xxhash32_hex{unpack('H*', pack('N', xxhash32(@_)))}
16 1     1 1 528 sub xxhash64_hex{lc int64_to_hex(xxhash64(@_))}
17             1;
18             __END__