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.104';
3 4     4   29 use warnings;
  4         7  
  4         142  
4 4     4   24 use strict;
  4         8  
  4         100  
5              
6             # ABSTRACT: Utility package for formatting common numbers
7              
8 4     4   19 use Exporter qw(import);
  4         8  
  4         690  
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 63 return sprintf("%08d", shift);
20             }
21              
22             sub format_location_number {
23 2     2 1 13 return sprintf("%012d", shift);
24             }
25              
26             sub format_rsin {
27 1     1 1 5 return sprintf("%09d", shift);
28             }
29              
30             __END__