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 4     4   41701 use strict;
  4         11  
  4         110  
4 4     4   22 use warnings;
  4         11  
  4         114  
5 4     4   1958 use charnames qw(:full);
  4         104926  
  4         27  
6 4     4   2585 use namespace::autoclean;
  4         58980  
  4         23  
7            
8             our $VERSION = '3.004';
9            
10             sub instance {
11 19     19 1 72 return __PACKAGE__;
12             }
13            
14             sub lexicon_key_separator {
15 5     5 1 92 return q{:};
16             }
17            
18             sub msg_key_separator {
19 15     15 1 38 my ( undef, $format ) = @_;
20            
21 15 100       124 defined $format
22             or return "\N{END OF TRANSMISSION}";
23 7 50       74 $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 37 my ( undef, $format ) = @_;
31            
32 15 100       96 defined $format
33             or return "\N{NULL}";
34 7 50       52 $format eq 'JSON'
35             and return '{PLURAL_SEPARATOR}';
36            
37 0           return "\N{NULL}";
38             }
39            
40             1;
41            
42             __END__