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