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   66924 use strict;
  3         5  
  3         62  
4 3     3   12 use warnings;
  3         4  
  3         62  
5 3     3   1223 use charnames qw(:full);
  3         68927  
  3         14  
6 3     3   1528 use namespace::autoclean;
  3         37201  
  3         12  
7            
8             our $VERSION = '4.001';
9            
10             sub instance {
11 19     19 1 112 return __PACKAGE__;
12             }
13            
14             sub lexicon_key_separator {
15 5     5 1 52 return q{:};
16             }
17            
18             sub msg_key_separator {
19 15     15 1 22 my ( undef, $format ) = @_;
20            
21 15 100       69 defined $format
22             or return "\N{END OF TRANSMISSION}";
23 7 50       46 $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 23 my ( undef, $format ) = @_;
31            
32 15 100       55 defined $format
33             or return "\N{NULL}";
34 7 50       36 $format eq 'JSON'
35             and return '{PLURAL_SEPARATOR}';
36            
37 0           return "\N{NULL}";
38             }
39            
40             1;
41            
42             __END__