File Coverage

blib/lib/WebService/KvKAPI/Formatters.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 3 3 100.0
total 21 21 100.0


line stmt bran cond sub pod time code
1             package WebService::KvKAPI::Formatters;
2             our $VERSION = '0.105';
3 4     4   28 use warnings;
  4         9  
  4         146  
4 4     4   23 use strict;
  4         8  
  4         99  
5              
6             # ABSTRACT: Utility package for formatting common numbers
7              
8 4     4   19 use Exporter qw(import);
  4         16  
  4         598  
9              
10             our @EXPORT_OK = qw(
11             format_rsin
12             format_location_number
13             format_kvk_number
14             );
15              
16             our %EXPORT_TAGS = (all => \@EXPORT_OK);
17              
18             sub format_kvk_number {
19 12     12 1 67 return sprintf("%08d", shift);
20             }
21              
22             sub format_location_number {
23 2     2 1 12 return sprintf("%012d", shift);
24             }
25              
26             sub format_rsin {
27 1     1 1 6 return sprintf("%09d", shift);
28             }
29              
30             __END__