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   74656 use strict;
  1         2  
  1         31  
3 1     1   5 use base qw(Exporter);
  1         2  
  1         88  
4 1     1   6 use Config ();
  1         1  
  1         13  
5 1     1   4 use XSLoader;
  1         2  
  1         19  
6 1     1   15 use Math::Int64 qw[uint64_to_hex];
  1         3  
  1         6  
7              
8             BEGIN {
9 1     1   108 our $VERSION = '2.04';
10 1         580 XSLoader::load __PACKAGE__, $VERSION;
11             }
12             our @EXPORT_OK = qw[xxhash32 xxhash32_hex
13             xxhash64 xxhash64_hex];
14 1     1 1 2690 sub xxhash32_hex { unpack('H8', pack('N', xxhash32(@_))) }
15 3     3 1 1286 sub xxhash64_hex { lc sprintf '%016s', uint64_to_hex(xxhash64(@_)) }
16             1;
17             __END__