File Coverage

blib/lib/Sort/Key/LargeInt.pm
Criterion Covered Total %
statement 24 25 96.0
branch n/a
condition n/a
subroutine 8 9 88.8
pod 0 1 0.0
total 32 35 91.4


line stmt bran cond sub pod time code
1             package Sort::Key::LargeInt;
2              
3 1     1   30207 use strict;
  1         2  
  1         36  
4 1     1   5 use warnings;
  1         2  
  1         71  
5              
6             BEGIN {
7 1     1   4 our $VERSION = '0.01';
8 1         8 require XSLoader;
9 1         737 XSLoader::load('Sort::Key::LargeInt', $VERSION);
10             }
11              
12             require Exporter;
13              
14             our @ISA = qw(Exporter);
15             our @EXPORT_OK = qw( largeintkeysort
16             largeintkeysort_inplace
17             rlargeintkeysort
18             rlargeintkeysort_inplace
19             largeintsort
20             largeintsort_inplace
21             rlargeintsort
22             rlargeintsort_inplace
23             encode_largeint
24             encode_largeint_hex);
25              
26             sub encode_largeint_hex {
27 0     0 0   join " ", map sprintf("%02x", ord($_)), split //, encode_largeint(@_);
28             }
29              
30 1     1   872 use Sort::Key::Register largeint => \&encode_largeint, 'str';
  1         5047  
  1         8  
31              
32 1     1   1045 use Sort::Key::Maker largeintkeysort => 'largeint';
  1         389  
  1         8  
33 1     1   559 use Sort::Key::Maker rlargeintkeysort => '-largeint';
  1         2  
  1         4  
34 1     1   488 use Sort::Key::Maker largeintsort => \&encode_largeint, 'str';
  1         3  
  1         4  
35 1     1   166 use Sort::Key::Maker rlargeintsort => \&encode_largeint, '-str';
  1         2  
  1         5  
36              
37             1;
38             __END__