« OO/Plugin/Expand/BabelFish/Loc/DomainAndCategory.pm
↑ Summary
OO/Plugin/Expand/Gettext/DomainAndCategory.pm »
| 1 | package Locale::TextDomain::OO::Plugin::Expand::Gettext::Loc::DomainAndCategory; ## no critic (TidyCode) | ||||||||||
| 2 | |||||||||||
| 3 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 4 | ▶ | use Locale::Utils::PlaceholderNamed; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 4 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 4 | our $VERSION = '1.030'; | |||||||||
| 9 | |||||||||||
| 10 | 4 | with qw( | |||||||||
| 11 | Locale::TextDomain::OO::Plugin::Expand::Gettext::Loc | ||||||||||
| 12 | Locale::TextDomain::OO::Role::DomainAndCategory | ||||||||||
| 13 | ); | ||||||||||
| 14 | |||||||||||
| 15 | 4 | requires qw( | |||||||||
| 16 | loc_x | ||||||||||
| 17 | loc_nx | ||||||||||
| 18 | loc_px | ||||||||||
| 19 | loc_npx | ||||||||||
| 20 | |||||||||||
| 21 | begin_c | ||||||||||
| 22 | begin_d | ||||||||||
| 23 | begin_dc | ||||||||||
| 24 | callback_scope | ||||||||||
| 25 | end_c | ||||||||||
| 26 | end_d | ||||||||||
| 27 | end_dc | ||||||||||
| 28 | ); | ||||||||||
| 29 | |||||||||||
| 30 | 0 | ▶ | sub loc_dx { | ||||||||
|
Subroutine
loc_dx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 31 | 0 | my ( $self, $domain, @more ) = @_; | |||||||||
| 32 | |||||||||||
| 33 | return $self->callback_scope( | ||||||||||
| 34 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 35 | 0 | $self->begin_d($domain); | |||||||||
| 36 | 0 | return $self->loc_x(@more); | |||||||||
| 37 | }, | ||||||||||
| 38 | 0 | ); | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 0 | ▶ | sub loc_cx { | ||||||||
|
Subroutine
loc_cx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 42 | 0 | my ($self, @more) = @_; | |||||||||
| 43 | |||||||||||
| 44 | return $self->callback_scope( | ||||||||||
| 45 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 46 | 0 | $self->begin_c( splice @more, 1, 1 ); | |||||||||
| 47 | 0 | return $self->loc_x(@more); | |||||||||
| 48 | }, | ||||||||||
| 49 | 0 | ); | |||||||||
| 50 | } | ||||||||||
| 51 | |||||||||||
| 52 | 0 | ▶ | sub loc_dcx { | ||||||||
|
Subroutine
loc_dcx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 53 | 0 | my ( $self, $domain, @more ) = @_; | |||||||||
| 54 | |||||||||||
| 55 | return $self->callback_scope( | ||||||||||
| 56 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 57 | 0 | $self->begin_d($domain); | |||||||||
| 58 | 0 | $self->begin_c( splice @more, 1, 1 ); | |||||||||
| 59 | 0 | return $self->loc_x(@more); | |||||||||
| 60 | }, | ||||||||||
| 61 | 0 | ); | |||||||||
| 62 | } | ||||||||||
| 63 | |||||||||||
| 64 | 0 | ▶ | sub loc_dnx { | ||||||||
|
Subroutine
loc_dnx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 65 | 0 | my ( $self, $domain, @more ) = @_; | |||||||||
| 66 | |||||||||||
| 67 | return $self->callback_scope( | ||||||||||
| 68 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 69 | 0 | $self->begin_d($domain); | |||||||||
| 70 | 0 | return $self->loc_nx(@more); | |||||||||
| 71 | }, | ||||||||||
| 72 | 0 | ); | |||||||||
| 73 | } | ||||||||||
| 74 | |||||||||||
| 75 | 0 | ▶ | sub loc_cnx { | ||||||||
|
Subroutine
loc_cnx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 76 | 0 | my ( $self, @more ) = @_; | |||||||||
| 77 | |||||||||||
| 78 | return $self->callback_scope( | ||||||||||
| 79 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 80 | 0 | $self->begin_c( splice @more, 3, 1 ); ## no critic (MagicNumbers) | |||||||||
| 81 | 0 | return $self->loc_nx(@more); | |||||||||
| 82 | }, | ||||||||||
| 83 | 0 | ); | |||||||||
| 84 | } | ||||||||||
| 85 | |||||||||||
| 86 | 0 | ▶ | sub loc_dcnx { | ||||||||
|
Subroutine
loc_dcnx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 87 | 0 | my ( $self, $domain, @more ) = @_; | |||||||||
| 88 | |||||||||||
| 89 | return $self->callback_scope( | ||||||||||
| 90 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 91 | 0 | $self->begin_d($domain); | |||||||||
| 92 | 0 | $self->begin_c( splice @more, 3, 1 ); ## no critic (MagicNumbers) | |||||||||
| 93 | 0 | return $self->loc_nx(@more); | |||||||||
| 94 | }, | ||||||||||
| 95 | 0 | ); | |||||||||
| 96 | } | ||||||||||
| 97 | |||||||||||
| 98 | 0 | ▶ | sub loc_dpx { | ||||||||
|
Subroutine
loc_dpx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 99 | 0 | my ( $self, $domain, @more ) = @_; | |||||||||
| 100 | |||||||||||
| 101 | return $self->callback_scope( | ||||||||||
| 102 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 103 | 0 | $self->begin_d($domain); | |||||||||
| 104 | 0 | return $self->loc_px(@more); | |||||||||
| 105 | }, | ||||||||||
| 106 | 0 | ); | |||||||||
| 107 | } | ||||||||||
| 108 | |||||||||||
| 109 | 0 | ▶ | sub loc_cpx { | ||||||||
|
Subroutine
loc_cpx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 110 | 0 | my ( $self, @more ) = @_; | |||||||||
| 111 | |||||||||||
| 112 | return $self->callback_scope( | ||||||||||
| 113 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 114 | 0 | $self->begin_c( splice @more, 2, 1 ); | |||||||||
| 115 | 0 | return $self->loc_px(@more); | |||||||||
| 116 | }, | ||||||||||
| 117 | 0 | ); | |||||||||
| 118 | } | ||||||||||
| 119 | |||||||||||
| 120 | 0 | ▶ | sub loc_dcpx { | ||||||||
|
Subroutine
loc_dcpx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 121 | 0 | my ( $self, $domain, @more ) = @_; | |||||||||
| 122 | |||||||||||
| 123 | return $self->callback_scope( | ||||||||||
| 124 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 125 | 0 | $self->begin_d($domain); | |||||||||
| 126 | 0 | $self->begin_c( splice @more, 2, 1 ); | |||||||||
| 127 | 0 | return $self->loc_px(@more); | |||||||||
| 128 | }, | ||||||||||
| 129 | 0 | ); | |||||||||
| 130 | } | ||||||||||
| 131 | |||||||||||
| 132 | 0 | ▶ | sub loc_dnpx { | ||||||||
|
Subroutine
loc_dnpx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 133 | 0 | my ( $self, $domain, @more ) = @_; | |||||||||
| 134 | |||||||||||
| 135 | return $self->callback_scope( | ||||||||||
| 136 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 137 | 0 | $self->begin_d($domain); | |||||||||
| 138 | 0 | return $self->loc_npx(@more); | |||||||||
| 139 | }, | ||||||||||
| 140 | 0 | ); | |||||||||
| 141 | } | ||||||||||
| 142 | |||||||||||
| 143 | 0 | ▶ | sub loc_cnpx { | ||||||||
|
Subroutine
loc_cnpx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 144 | 0 | my ($self, @more) = @_; | |||||||||
| 145 | |||||||||||
| 146 | return $self->callback_scope( | ||||||||||
| 147 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 148 | 0 | $self->begin_c( splice @more, 4, 1 ); ## no critic (MagicNumbers) | |||||||||
| 149 | 0 | return $self->loc_npx(@more); | |||||||||
| 150 | }, | ||||||||||
| 151 | 0 | ); | |||||||||
| 152 | } | ||||||||||
| 153 | |||||||||||
| 154 | 0 | ▶ | sub loc_dcnpx { | ||||||||
|
Subroutine
loc_dcnpx: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 155 | 0 | my ( $self, $domain, @more ) = @_; | |||||||||
| 156 | |||||||||||
| 157 | return $self->callback_scope( | ||||||||||
| 158 | 0 | ▶ | sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 159 | 0 | $self->begin_d($domain); | |||||||||
| 160 | 0 | $self->begin_c( splice @more, 4, 1 ); ## no critic (MagicNumbers) | |||||||||
| 161 | 0 | return $self->loc_npx(@more); | |||||||||
| 162 | }, | ||||||||||
| 163 | 0 | ); | |||||||||
| 164 | } | ||||||||||
| 165 | |||||||||||
| 166 | { | ||||||||||
| 167 | 4 | ▶ | no warnings qw(redefine); ## no critic (NoWarnings) | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 168 | |||||||||||
| 169 | # Dummy methods for string marking. | ||||||||||
| 170 | 0 | ▶ | my $dummy = sub { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||
| 171 | 0 | my (undef, @more) = @_; | |||||||||
| 172 | 0 | ▶ | return wantarray ? @more : $more[0]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 173 | 4 | }; | |||||||||
| 174 | |||||||||||
| 175 | 4 | *loc_begin_c = \&begin_c; | |||||||||
| 176 | 4 | *loc_begin_d = \&begin_d; | |||||||||
| 177 | 4 | *loc_begin_dc = \&begin_dc; | |||||||||
| 178 | |||||||||||
| 179 | 4 | *loc_end_c = \&end_c; | |||||||||
| 180 | 4 | *loc_end_d = \&end_d; | |||||||||
| 181 | 4 | *loc_end_dc = \&end_dc; | |||||||||
| 182 | |||||||||||
| 183 | 4 | *loc_d = \&loc_dx; | |||||||||
| 184 | 4 | *loc_dn = \&loc_dnx; | |||||||||
| 185 | 4 | *loc_dp = \&loc_dpx; | |||||||||
| 186 | 4 | *loc_dnp = \&loc_dnpx; | |||||||||
| 187 | |||||||||||
| 188 | 4 | *loc_c = \&loc_cx; | |||||||||
| 189 | 4 | *loc_cn = \&loc_cnx; | |||||||||
| 190 | 4 | *loc_cp = \&loc_cpx; | |||||||||
| 191 | 4 | *loc_cnp = \&loc_cnpx; | |||||||||
| 192 | |||||||||||
| 193 | 4 | *loc_dc = \&loc_dcx; | |||||||||
| 194 | 4 | *loc_dcn = \&loc_dcnx; | |||||||||
| 195 | 4 | *loc_dcp = \&loc_dcpx; | |||||||||
| 196 | 4 | *loc_dcnp = \&loc_dcnpx; | |||||||||
| 197 | |||||||||||
| 198 | 4 | *Nloc_d = $dummy; | |||||||||
| 199 | 4 | *Nloc_dn = $dummy; | |||||||||
| 200 | 4 | *Nloc_dp = $dummy; | |||||||||
| 201 | 4 | *Nloc_dnp = $dummy; | |||||||||
| 202 | |||||||||||
| 203 | 4 | *Nloc_dx = $dummy; | |||||||||
| 204 | 4 | *Nloc_dnx = $dummy; | |||||||||
| 205 | 4 | *Nloc_dpx = $dummy; | |||||||||
| 206 | 4 | *Nloc_dnpx = $dummy; | |||||||||
| 207 | |||||||||||
| 208 | 4 | *Nloc_c = $dummy; | |||||||||
| 209 | 4 | *Nloc_cn = $dummy; | |||||||||
| 210 | 4 | *Nloc_cp = $dummy; | |||||||||
| 211 | 4 | *Nloc_cnp = $dummy; | |||||||||
| 212 | |||||||||||
| 213 | 4 | *Nloc_cx = $dummy; | |||||||||
| 214 | 4 | *Nloc_cnx = $dummy; | |||||||||
| 215 | 4 | *Nloc_cpx = $dummy; | |||||||||
| 216 | 4 | *Nloc_cnpx = $dummy; | |||||||||
| 217 | |||||||||||
| 218 | 4 | *Nloc_dc = $dummy; | |||||||||
| 219 | 4 | *Nloc_dcn = $dummy; | |||||||||
| 220 | 4 | *Nloc_dcp = $dummy; | |||||||||
| 221 | 4 | *Nloc_dcnp = $dummy; | |||||||||
| 222 | |||||||||||
| 223 | 4 | *Nloc_dcx = $dummy; | |||||||||
| 224 | 4 | *Nloc_dcnx = $dummy; | |||||||||
| 225 | 4 | *Nloc_dcpx = $dummy; | |||||||||
| 226 | 4 | *Nloc_dcnpx = $dummy; | |||||||||
| 227 | } | ||||||||||
| 228 | |||||||||||
| 229 | 4 | 1; | |||||||||
| 230 | |||||||||||
| 231 | __END__ | ||||||||||