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   17995 use strict;
  1         2  
  1         36  
3 1     1   4 use base qw(Exporter);
  1         1  
  1         88  
4 1     1   3 use Config ();
  1         6  
  1         12  
5 1     1   2 use XSLoader;
  1         2  
  1         15  
6 1     1   3 use Math::Int64 qw[int64_to_hex];
  1         1  
  1         4  
7             BEGIN {
8 1     1   103 our $VERSION = '2.02';
9 1         533 XSLoader::load __PACKAGE__, $VERSION;
10             }
11            
12             our @EXPORT_OK = qw[xxhash32 xxhash32_hex
13             xxhash64 xxhash64_hex];
14            
15 1     1 1 1915 sub xxhash32_hex{unpack('H*', pack('N', xxhash32(@_)))}
16 1     1 1 944 sub xxhash64_hex{lc int64_to_hex(xxhash64(@_))}
17             1;
18             __END__