File Coverage

blib/lib/Locale/TextDomain/OO/Util/Constants.pm
Criterion Covered Total %
statement 20 22 90.9
branch 6 8 75.0
condition n/a
subroutine 8 8 100.0
pod 4 4 100.0
total 38 42 90.4


line stmt bran cond sub pod time code
1             package Locale::TextDomain::OO::Util::Constants; ## no critic (TidyCode)
2            
3 3     3   85006 use strict;
  3         7  
  3         85  
4 3     3   15 use warnings;
  3         6  
  3         140  
5 3     3   1516 use charnames qw(:full);
  3         91048  
  3         20  
6 3     3   1905 use namespace::autoclean;
  3         48668  
  3         15  
7            
8             our $VERSION = '4.001';
9            
10             sub instance {
11 19     19 1 192 return __PACKAGE__;
12             }
13            
14             sub lexicon_key_separator {
15 5     5 1 86 return q{:};
16             }
17            
18             sub msg_key_separator {
19 15     15 1 34 my ( undef, $format ) = @_;
20            
21 15 100       101 defined $format
22             or return "\N{END OF TRANSMISSION}";
23 7 50       72 $format eq 'JSON'
24             and return '{MSG_KEY_SEPARATOR}';
25            
26 0         0 return "\N{END OF TRANSMISSION}";
27             }
28            
29             sub plural_separator {
30 15     15 1 32 my ( undef, $format ) = @_;
31            
32 15 100       75 defined $format
33             or return "\N{NULL}";
34 7 50       49 $format eq 'JSON'
35             and return '{PLURAL_SEPARATOR}';
36            
37 0           return "\N{NULL}";
38             }
39            
40             1;
41            
42             __END__