| 1 | #! /bin/false | ||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||
| 3 | # vim: set autoindent shiftwidth=4 tabstop=4: | ||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||
| 5 | # Copyright (C) 2002-2026 Guido Flohr <guido.flohr@cantanea.com>, | ||||||||||||||||||||||||||||||||
| 6 | # all rights reserved. | ||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||
| 8 | # This program is free software: you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||
| 9 | # it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||
| 10 | # the Free Software Foundation; either version 3 of the License, or | ||||||||||||||||||||||||||||||||
| 11 | # (at your option) any later version. | ||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||
| 13 | # This program is distributed in the hope that it will be useful, | ||||||||||||||||||||||||||||||||
| 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||||||||||||||||||||||||
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||||||||||||||||||||||||||||
| 16 | # GNU General Public License for more details. | ||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||
| 18 | # You should have received a copy of the GNU General Public License | ||||||||||||||||||||||||||||||||
| 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||
| 21 | package Locale::Messages; | ||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||
| 23 | 25 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||
| 25 | 25 | ▶ | use vars qw ($package @EXPORT_OK %EXPORT_TAGS @ISA $VERSION); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||
| 27 | 25 | $VERSION = '1.37'; | |||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||
| 29 | # Try to load the C version first. | ||||||||||||||||||||||||||||||||
| 30 | 25 | $package = 'gettext_xs'; | |||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||
| 32 | # Do not load from current working directory. | ||||||||||||||||||||||||||||||||
| 33 | 25 | local @INC = grep { $_ ne '.' } @INC; | |||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||
| 35 | 25 | eval <<'EOF'; | |||||||||||||||||||||||||||||||
| 36 | require Locale::gettext_xs; | ||||||||||||||||||||||||||||||||
| 37 | my $version = Locale::gettext_xs::__gettext_xs_version(); | ||||||||||||||||||||||||||||||||
| 38 | die "Version: version mismatch ($VERSION vs. $version)" unless $version eq $VERSION; | ||||||||||||||||||||||||||||||||
| 39 | EOF | ||||||||||||||||||||||||||||||||
| 40 | 25 | my $no_xs = $@; | |||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||
| 42 | # There are systems where setlocale() and the LC_ constants are not | ||||||||||||||||||||||||||||||||
| 43 | # defined at all, see https://rt.cpan.org/Ticket/Display.html?id=98109 | ||||||||||||||||||||||||||||||||
| 44 | # | ||||||||||||||||||||||||||||||||
| 45 | # On such systems, we always fall back to gettext_dumb. | ||||||||||||||||||||||||||||||||
| 46 | 25 | ▶ | if ($no_xs) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 47 | 0 | eval { | |||||||||||||||||||||||||||||||
| 48 | 0 | require POSIX; | |||||||||||||||||||||||||||||||
| 49 | # void | ||||||||||||||||||||||||||||||||
| 50 | 0 | POSIX::setlocale(POSIX::LC_ALL()); | |||||||||||||||||||||||||||||||
| 51 | }; | ||||||||||||||||||||||||||||||||
| 52 | 0 | ▶ | if ($@) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 53 | 0 | $package = 'gettext_dumb'; | |||||||||||||||||||||||||||||||
| 54 | 0 | require Locale::gettext_dumb; | |||||||||||||||||||||||||||||||
| 55 | } else { | ||||||||||||||||||||||||||||||||
| 56 | 0 | $package = 'gettext_pp'; | |||||||||||||||||||||||||||||||
| 57 | 0 | require Locale::gettext_pp; | |||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||
| 61 | 25 | require Exporter; | |||||||||||||||||||||||||||||||
| 62 | 25 | @ISA = qw (Exporter); | |||||||||||||||||||||||||||||||
| 63 | 25 | %EXPORT_TAGS = (locale_h => [ qw (gettext | |||||||||||||||||||||||||||||||
| 64 | dgettext | ||||||||||||||||||||||||||||||||
| 65 | dcgettext | ||||||||||||||||||||||||||||||||
| 66 | ngettext | ||||||||||||||||||||||||||||||||
| 67 | dngettext | ||||||||||||||||||||||||||||||||
| 68 | dcngettext | ||||||||||||||||||||||||||||||||
| 69 | pgettext | ||||||||||||||||||||||||||||||||
| 70 | dpgettext | ||||||||||||||||||||||||||||||||
| 71 | dcpgettext | ||||||||||||||||||||||||||||||||
| 72 | npgettext | ||||||||||||||||||||||||||||||||
| 73 | dnpgettext | ||||||||||||||||||||||||||||||||
| 74 | dcnpgettext | ||||||||||||||||||||||||||||||||
| 75 | textdomain | ||||||||||||||||||||||||||||||||
| 76 | bindtextdomain | ||||||||||||||||||||||||||||||||
| 77 | bind_textdomain_codeset | ||||||||||||||||||||||||||||||||
| 78 | ) | ||||||||||||||||||||||||||||||||
| 79 | ], | ||||||||||||||||||||||||||||||||
| 80 | libintl_h => [ qw (LC_CTYPE | ||||||||||||||||||||||||||||||||
| 81 | LC_NUMERIC | ||||||||||||||||||||||||||||||||
| 82 | LC_TIME | ||||||||||||||||||||||||||||||||
| 83 | LC_COLLATE | ||||||||||||||||||||||||||||||||
| 84 | LC_MONETARY | ||||||||||||||||||||||||||||||||
| 85 | LC_MESSAGES | ||||||||||||||||||||||||||||||||
| 86 | LC_ALL) | ||||||||||||||||||||||||||||||||
| 87 | ], | ||||||||||||||||||||||||||||||||
| 88 | ); | ||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||
| 90 | 25 | @EXPORT_OK = qw (select_package | |||||||||||||||||||||||||||||||
| 91 | turn_utf_8_on | ||||||||||||||||||||||||||||||||
| 92 | turn_utf_8_off | ||||||||||||||||||||||||||||||||
| 93 | gettext | ||||||||||||||||||||||||||||||||
| 94 | dgettext | ||||||||||||||||||||||||||||||||
| 95 | dcgettext | ||||||||||||||||||||||||||||||||
| 96 | ngettext | ||||||||||||||||||||||||||||||||
| 97 | dngettext | ||||||||||||||||||||||||||||||||
| 98 | dcngettext | ||||||||||||||||||||||||||||||||
| 99 | pgettext | ||||||||||||||||||||||||||||||||
| 100 | dpgettext | ||||||||||||||||||||||||||||||||
| 101 | dcpgettext | ||||||||||||||||||||||||||||||||
| 102 | npgettext | ||||||||||||||||||||||||||||||||
| 103 | dnpgettext | ||||||||||||||||||||||||||||||||
| 104 | dcnpgettext | ||||||||||||||||||||||||||||||||
| 105 | textdomain | ||||||||||||||||||||||||||||||||
| 106 | bindtextdomain | ||||||||||||||||||||||||||||||||
| 107 | bind_textdomain_codeset | ||||||||||||||||||||||||||||||||
| 108 | bind_textdomain_filter | ||||||||||||||||||||||||||||||||
| 109 | nl_putenv | ||||||||||||||||||||||||||||||||
| 110 | setlocale | ||||||||||||||||||||||||||||||||
| 111 | LC_CTYPE | ||||||||||||||||||||||||||||||||
| 112 | LC_NUMERIC | ||||||||||||||||||||||||||||||||
| 113 | LC_TIME | ||||||||||||||||||||||||||||||||
| 114 | LC_COLLATE | ||||||||||||||||||||||||||||||||
| 115 | LC_MONETARY | ||||||||||||||||||||||||||||||||
| 116 | LC_MESSAGES | ||||||||||||||||||||||||||||||||
| 117 | LC_ALL); | ||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||
| 119 | 25 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=7 SCAR=25.3
| |||||||||||||||||||||||||||||||||
| 120 | 25 | my ($has_encode, $has_bytes); | |||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||
| 122 | 25 | ▶ | if ($] >= 5.006) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 123 | 25 | ▶ | unless (defined $has_encode) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 124 | 25 | eval "require Encode"; | |||||||||||||||||||||||||||||||
| 125 | 25 | $has_encode = !$@; | |||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||
| 128 | 25 | ▶ | unless ($has_encode || defined $has_bytes) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$has_encode or defined $has_bytes
MC/DC0%0/2
$has_encode or defined $has_bytes
$has_encode
defined $has_bytes
Truth table33%1/3
A or B
A= $has_encodeB= defined $has_bytes
| |||||||||||||||||||||||||||||||||
| 129 | 0 | eval "use bytes"; | |||||||||||||||||||||||||||||||
| 130 | 0 | $has_bytes = !$@; | |||||||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||||||
| 132 | } | ||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||
| 134 | # Turn the UTF-8 flag on or off unconditionally. The prototypes | ||||||||||||||||||||||||||||||||
| 135 | # allow an optional second parameter, so that you can use the | ||||||||||||||||||||||||||||||||
| 136 | # functions as callbacks to bind_textdomain_filter. | ||||||||||||||||||||||||||||||||
| 137 | 25 | ▶ | if ($has_encode) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||
| 138 | 0 | ▶ | eval <<'EOF'; | ||||||||||||||||||||||||||||||
|
Subroutine
turn_utf_8_off: called CC=1 SCAR=0.6
Subroutine
turn_utf_8_on: not called CC=1 SCAR=0.6
Pod
documented
Pod
documented
| |||||||||||||||||||||||||||||||||
| 139 | sub turn_utf_8_on($;$) | ||||||||||||||||||||||||||||||||
| 140 | { | ||||||||||||||||||||||||||||||||
| 141 | Encode::_utf8_on ($_[0]); | ||||||||||||||||||||||||||||||||
| 142 | return $_[0]; | ||||||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||
| 145 | sub turn_utf_8_off($;$) | ||||||||||||||||||||||||||||||||
| 146 | { | ||||||||||||||||||||||||||||||||
| 147 | Encode::_utf8_off ($_[0]); | ||||||||||||||||||||||||||||||||
| 148 | return $_[0]; | ||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||
| 151 | EOF | ||||||||||||||||||||||||||||||||
| 152 | } elsif ($has_bytes) { | ||||||||||||||||||||||||||||||||
| 153 | 0 | eval <<'EOF'; | |||||||||||||||||||||||||||||||
| 154 | sub turn_utf_8_on($;$) | ||||||||||||||||||||||||||||||||
| 155 | { | ||||||||||||||||||||||||||||||||
| 156 | $_[0] = pack "U0C*", unpack "C*", $_[0]; | ||||||||||||||||||||||||||||||||
| 157 | } | ||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||
| 159 | sub turn_utf_8_off($;$) | ||||||||||||||||||||||||||||||||
| 160 | { | ||||||||||||||||||||||||||||||||
| 161 | use bytes; | ||||||||||||||||||||||||||||||||
| 162 | $_[0] = join "", split //, $_[0]; | ||||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||
| 165 | EOF | ||||||||||||||||||||||||||||||||
| 166 | } else { | ||||||||||||||||||||||||||||||||
| 167 | 0 | eval <<'EOF'; | |||||||||||||||||||||||||||||||
| 168 | sub turn_utf_8_on($;$) | ||||||||||||||||||||||||||||||||
| 169 | { | ||||||||||||||||||||||||||||||||
| 170 | return $_[0]; | ||||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||||||
| 173 | sub turn_utf_8_off($;$) | ||||||||||||||||||||||||||||||||
| 174 | { | ||||||||||||||||||||||||||||||||
| 175 | return $_[0]; | ||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||
| 178 | EOF | ||||||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||
| 182 | # The textdomain could be undef. We avoid a warning by specifying | ||||||||||||||||||||||||||||||||
| 183 | # a filter for the undefined textdomain. | ||||||||||||||||||||||||||||||||
| 184 | 25 | my %filters = (undef => \&turn_utf_8_off); | |||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||
| 186 | 21 | ▶ | sub select_package { | ||||||||||||||||||||||||||||||
|
Subroutine
select_package: called CC=10 SCAR=27.1
Pod
documented
| |||||||||||||||||||||||||||||||||
| 187 | 21 | my ($pkg, $compatibility) = @_; | |||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||
| 189 | # Compatibility quirk for a bug pre 1.17: | ||||||||||||||||||||||||||||||||
| 190 | 21 | ▶ | if (__PACKAGE__ eq $pkg && defined $compatibility) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
__PACKAGE__ eq $pkg and defined $compatibility
MC/DC0%0/2
__PACKAGE__ eq $pkg and defined $compatibility
__PACKAGE__ eq $pkg
defined $compatibility
Truth table33%1/3
A and B
A= __PACKAGE__ eq $pkgB= defined $compatibility
| |||||||||||||||||||||||||||||||||
| 191 | 21 | $pkg = $compatibility; | |||||||||||||||||||||||||||||||
| 192 | } | ||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||
| 194 | 21 | ▶ | if ($no_xs && 'gettext_xs' eq $pkg) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$no_xs and "gettext_xs" eq $pkg
MC/DC0%0/2
$no_xs and "gettext_xs" eq $pkg
$no_xs
"gettext_xs" eq $pkg
Truth table33%1/3
A and B
A= $no_xsB= "gettext_xs" eq $pkg
| |||||||||||||||||||||||||||||||||
| 195 | 0 | $pkg = 'gettext_pp'; | |||||||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||
| 198 | 21 | ▶ | if (defined $pkg && 'gettext_pp' eq $pkg) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%2/3
defined $pkg and "gettext_pp" eq $pkg
MC/DC50%1/2
defined $pkg and "gettext_pp" eq $pkg
defined $pkg
"gettext_pp" eq $pkg
Truth table66%2/3
A and B
A= defined $pkgB= "gettext_pp" eq $pkg
| |||||||||||||||||||||||||||||||||
| 199 | # This branch is not unnecessary. The next (elsif) branch does | ||||||||||||||||||||||||||||||||
| 200 | # essentially the same but catches compilation errors. | ||||||||||||||||||||||||||||||||
| 201 | 20 | require Locale::gettext_pp; | |||||||||||||||||||||||||||||||
| 202 | 20 | $package = 'gettext_pp'; | |||||||||||||||||||||||||||||||
| 203 | } elsif (defined $pkg) { | ||||||||||||||||||||||||||||||||
| 204 | 1 | my $filename = "Locale::$pkg"; | |||||||||||||||||||||||||||||||
| 205 | 1 | $filename =~ s{::|\'}{/}; | |||||||||||||||||||||||||||||||
| 206 | 1 | $filename .= '.pm'; | |||||||||||||||||||||||||||||||
| 207 | 1 | eval { require $filename }; | |||||||||||||||||||||||||||||||
| 208 | 1 | ▶ | $package = $pkg unless $@; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 209 | } else { | ||||||||||||||||||||||||||||||||
| 210 | 0 | eval "require Locale::gettext_xs"; | |||||||||||||||||||||||||||||||
| 211 | 0 | ▶ | $package = 'gettext_xs' unless $@; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||
| 214 | 21 | return $package; | |||||||||||||||||||||||||||||||
| 215 | } | ||||||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||||||
| 217 | 1 | ▶ | sub bind_textdomain_filter ($;$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
bind_textdomain_filter: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 218 | 1 | my ($textdomain, $coderef, $data) = @_; | |||||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||||||
| 220 | 1 | $filters{$textdomain} = [ $coderef, $data ]; | |||||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||||||
| 222 | 1 | return 1; | |||||||||||||||||||||||||||||||
| 223 | } | ||||||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||||||
| 225 | 209 | ▶ | sub textdomain (;$) { | ||||||||||||||||||||||||||||||
|
Subroutine
textdomain: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 226 | 209 | my $function = "Locale::${package}::textdomain"; | |||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||
| 228 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 229 | 209 | &$function; | |||||||||||||||||||||||||||||||
| 230 | } | ||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||
| 232 | 41 | ▶ | sub bindtextdomain ($;$) { | ||||||||||||||||||||||||||||||
|
Subroutine
bindtextdomain: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 233 | 41 | my $function = "Locale::${package}::bindtextdomain"; | |||||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||||||
| 235 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 236 | 41 | &$function; | |||||||||||||||||||||||||||||||
| 237 | } | ||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||
| 239 | 2 | ▶ | sub bind_textdomain_codeset ($;$) { | ||||||||||||||||||||||||||||||
|
Subroutine
bind_textdomain_codeset: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 240 | 2 | my $function = "Locale::${package}::bind_textdomain_codeset"; | |||||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||||||
| 242 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 243 | 2 | &$function; | |||||||||||||||||||||||||||||||
| 244 | } | ||||||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||||||
| 246 | 106 | ▶ | sub gettext ($) { | ||||||||||||||||||||||||||||||
|
Subroutine
gettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 247 | 106 | my $textdomain = textdomain; | |||||||||||||||||||||||||||||||
| 248 | 106 | ▶ | $filters{$textdomain} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$textdomain} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$textdomain} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$textdomain}
Truth table100%2/2
A
A= $filters{$textdomain}
| |||||||||||||||||||||||||||||||||
| 249 | 106 | my $cb = $filters{$textdomain}; | |||||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||||||
| 251 | 106 | my $function = "Locale::${package}::gettext"; | |||||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||||||
| 253 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 254 | 106 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 255 | } | ||||||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||||||
| 257 | 12 | ▶ | sub dgettext($$) { | ||||||||||||||||||||||||||||||
|
Subroutine
dgettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 258 | 12 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||||
| 260 | 12 | my $function = "Locale::${package}::dgettext"; | |||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||
| 262 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 263 | 12 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 264 | } | ||||||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||||||
| 266 | 12 | ▶ | sub dcgettext($$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
dcgettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 267 | 12 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||
| 269 | 12 | my $function = "Locale::${package}::dcgettext"; | |||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||
| 271 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 272 | 12 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||
| 275 | 83 | ▶ | sub ngettext($$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
ngettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 276 | 83 | my $textdomain = textdomain; | |||||||||||||||||||||||||||||||
| 277 | 83 | ▶ | $filters{$textdomain} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$textdomain} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$textdomain} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$textdomain}
Truth table100%2/2
A
A= $filters{$textdomain}
| |||||||||||||||||||||||||||||||||
| 278 | 83 | my $cb = $filters{$textdomain}; | |||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||
| 280 | 83 | my $function = "Locale::${package}::ngettext"; | |||||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||||||
| 282 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 283 | 83 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 284 | } | ||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||
| 286 | 83 | ▶ | sub dngettext($$$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
dngettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 287 | 83 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||||||
| 289 | 83 | my $function = "Locale::${package}::dngettext"; | |||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||
| 291 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 292 | 83 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 293 | } | ||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||
| 295 | 83 | ▶ | sub dcngettext($$$$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
dcngettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 296 | 83 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||
| 298 | 83 | my $function = "Locale::${package}::dcngettext"; | |||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||||
| 300 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 301 | 83 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 302 | } | ||||||||||||||||||||||||||||||||
| 303 | |||||||||||||||||||||||||||||||||
| 304 | 3 | ▶ | sub pgettext($$) { | ||||||||||||||||||||||||||||||
|
Subroutine
pgettext: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 305 | 3 | my $textdomain = textdomain; | |||||||||||||||||||||||||||||||
| 306 | 3 | ▶ | $filters{$textdomain} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$filters{$textdomain} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC0%0/1
$filters{$textdomain} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$textdomain}
Truth table50%1/2
A
A= $filters{$textdomain}
| |||||||||||||||||||||||||||||||||
| 307 | 3 | my $cb = $filters{$textdomain}; | |||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||
| 309 | 3 | my $function = "Locale::${package}::pgettext"; | |||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||
| 311 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 312 | 3 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 313 | } | ||||||||||||||||||||||||||||||||
| 314 | |||||||||||||||||||||||||||||||||
| 315 | 4 | ▶ | sub dpgettext($$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
dpgettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 316 | 4 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||||||
| 318 | 4 | my $function = "Locale::${package}::dpgettext"; | |||||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||||||
| 320 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 321 | 4 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||||||
| 323 | |||||||||||||||||||||||||||||||||
| 324 | 5 | ▶ | sub dcpgettext($$$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
dcpgettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 325 | 5 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||||||
| 327 | 5 | my $function = "Locale::${package}::dcpgettext"; | |||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||
| 329 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 330 | 5 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 331 | } | ||||||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||||||
| 333 | 91 | ▶ | sub npgettext($$$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
npgettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 334 | 91 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||
| 336 | 91 | my $function = "Locale::${package}::npgettext"; | |||||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||||||
| 338 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 339 | 91 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 340 | } | ||||||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||||||
| 342 | 91 | ▶ | sub dnpgettext($$$$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
dnpgettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 343 | 91 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||
| 345 | 91 | my $function = "Locale::${package}::dnpgettext"; | |||||||||||||||||||||||||||||||
| 346 | |||||||||||||||||||||||||||||||||
| 347 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 348 | 91 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 349 | } | ||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||
| 351 | 91 | ▶ | sub dcnpgettext($$$$$$) { | ||||||||||||||||||||||||||||||
|
Subroutine
dcnpgettext: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 352 | 91 | ▶ | my $cb = $filters{$_[0]} ||= [ \&turn_utf_8_off ]; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
MC/DC100%1/1
$filters{$_[0]} ||= [\&Locale::Messages::turn_utf_8_off]
$filters{$_[0]}
Truth table100%2/2
A
A= $filters{$_[0]}
| |||||||||||||||||||||||||||||||||
| 353 | |||||||||||||||||||||||||||||||||
| 354 | 91 | my $function = "Locale::${package}::dcnpgettext"; | |||||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||||||
| 356 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 357 | 91 | $cb->[0] (&$function, $cb->[1]); | |||||||||||||||||||||||||||||||
| 358 | } | ||||||||||||||||||||||||||||||||
| 359 | |||||||||||||||||||||||||||||||||
| 360 | 128 | ▶ | sub setlocale($;$) { | ||||||||||||||||||||||||||||||
|
Subroutine
setlocale: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 361 | 128 | my $function = "Locale::${package}::setlocale"; | |||||||||||||||||||||||||||||||
| 362 | |||||||||||||||||||||||||||||||||
| 363 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 364 | 128 | &$function; | |||||||||||||||||||||||||||||||
| 365 | } | ||||||||||||||||||||||||||||||||
| 366 | |||||||||||||||||||||||||||||||||
| 367 | 530 | ▶ | sub nl_putenv($) { | ||||||||||||||||||||||||||||||
|
Subroutine
nl_putenv: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 368 | 530 | my $function = "Locale::${package}::nl_putenv"; | |||||||||||||||||||||||||||||||
| 369 | |||||||||||||||||||||||||||||||||
| 370 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 371 | 530 | &$function; | |||||||||||||||||||||||||||||||
| 372 | } | ||||||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||||||
| 374 | 0 | ▶ | sub LC_NUMERIC { | ||||||||||||||||||||||||||||||
|
Subroutine
LC_NUMERIC: not called CC=1 SCAR=0.6
Pod
documented
| |||||||||||||||||||||||||||||||||
| 375 | 0 | my $function = "Locale::${package}::LC_NUMERIC"; | |||||||||||||||||||||||||||||||
| 376 | |||||||||||||||||||||||||||||||||
| 377 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 378 | 0 | &$function; | |||||||||||||||||||||||||||||||
| 379 | } | ||||||||||||||||||||||||||||||||
| 380 | |||||||||||||||||||||||||||||||||
| 381 | 0 | ▶ | sub LC_CTYPE { | ||||||||||||||||||||||||||||||
|
Subroutine
LC_CTYPE: not called CC=1 SCAR=0.6
Pod
documented
| |||||||||||||||||||||||||||||||||
| 382 | 0 | my $function = "Locale::${package}::LC_CTYPE"; | |||||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||||||
| 384 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 385 | 0 | &$function; | |||||||||||||||||||||||||||||||
| 386 | } | ||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||
| 388 | 0 | ▶ | sub LC_TIME { | ||||||||||||||||||||||||||||||
|
Subroutine
LC_TIME: not called CC=1 SCAR=0.6
Pod
documented
| |||||||||||||||||||||||||||||||||
| 389 | 0 | my $function = "Locale::${package}::LC_TIME"; | |||||||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||||||||
| 391 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 392 | 0 | &$function; | |||||||||||||||||||||||||||||||
| 393 | } | ||||||||||||||||||||||||||||||||
| 394 | |||||||||||||||||||||||||||||||||
| 395 | 0 | ▶ | sub LC_COLLATE { | ||||||||||||||||||||||||||||||
|
Subroutine
LC_COLLATE: not called CC=1 SCAR=0.6
Pod
documented
| |||||||||||||||||||||||||||||||||
| 396 | 0 | my $function = "Locale::${package}::LC_COLLATE"; | |||||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||||||
| 398 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 399 | 0 | &$function; | |||||||||||||||||||||||||||||||
| 400 | } | ||||||||||||||||||||||||||||||||
| 401 | |||||||||||||||||||||||||||||||||
| 402 | 0 | ▶ | sub LC_MONETARY { | ||||||||||||||||||||||||||||||
|
Subroutine
LC_MONETARY: not called CC=1 SCAR=0.6
Pod
documented
| |||||||||||||||||||||||||||||||||
| 403 | 0 | my $function = "Locale::${package}::LC_MONETARY"; | |||||||||||||||||||||||||||||||
| 404 | |||||||||||||||||||||||||||||||||
| 405 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 406 | 0 | &$function; | |||||||||||||||||||||||||||||||
| 407 | } | ||||||||||||||||||||||||||||||||
| 408 | |||||||||||||||||||||||||||||||||
| 409 | 191 | ▶ | sub LC_MESSAGES { | ||||||||||||||||||||||||||||||
|
Subroutine
LC_MESSAGES: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 410 | 191 | my $function = "Locale::${package}::LC_MESSAGES"; | |||||||||||||||||||||||||||||||
| 411 | |||||||||||||||||||||||||||||||||
| 412 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 413 | 191 | &$function; | |||||||||||||||||||||||||||||||
| 414 | } | ||||||||||||||||||||||||||||||||
| 415 | |||||||||||||||||||||||||||||||||
| 416 | 0 | ▶ | sub LC_ALL { | ||||||||||||||||||||||||||||||
|
Subroutine
LC_ALL: not called CC=1 SCAR=0.6
Pod
documented
| |||||||||||||||||||||||||||||||||
| 417 | 0 | my $function = "Locale::${package}::LC_ALL"; | |||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||
| 419 | 25 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 420 | 0 | &$function; | |||||||||||||||||||||||||||||||
| 421 | } | ||||||||||||||||||||||||||||||||
| 422 | |||||||||||||||||||||||||||||||||
| 423 | 25 | 1; | |||||||||||||||||||||||||||||||
| 424 | |||||||||||||||||||||||||||||||||
| 425 | __END__ | ||||||||||||||||||||||||||||||||