line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Locale::Maketext::Utils::Phrase::cPanel; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
81573
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
107
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
141
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$Locale::Maketext::Utils::Phrase::cPanel::VERSION = '0.1'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
961
|
use Locale::Maketext::Utils::Phrase::Norm (); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
69
|
|
9
|
2
|
|
|
2
|
|
18
|
use base 'Locale::Maketext::Utils::Phrase::Norm'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
399
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Mock Cpanel::Locale-specific bracket notation methods for the filters’ default maketext object: |
12
|
2
|
|
|
2
|
|
1699
|
use Locale::Maketext::Utils::Mock (); |
|
2
|
|
|
|
|
148
|
|
|
2
|
|
|
|
|
525
|
|
13
|
|
|
|
|
|
|
Locale::Maketext::Utils::Mock->create_method( |
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
'output_cpanel_error' => undef, |
16
|
|
|
|
|
|
|
'get_locale_name_or_nothing' => undef, |
17
|
|
|
|
|
|
|
'get_locale_name' => undef, |
18
|
|
|
|
|
|
|
'get_user_locale_name' => undef, |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new_legacy_source { |
23
|
3
|
50
|
|
3
|
1
|
2071
|
my $conf = ref( $_[-1] ) eq 'HASH' ? pop(@_) : {}; |
24
|
|
|
|
|
|
|
|
25
|
3
|
|
|
|
|
13
|
$conf->{'exclude_filters'}{'Ampersand'} = 1; |
26
|
3
|
|
|
|
|
7
|
$conf->{'exclude_filters'}{'Markup'} = 1; |
27
|
|
|
|
|
|
|
|
28
|
3
|
|
|
|
|
8
|
push @_, $conf; |
29
|
3
|
|
|
|
|
11
|
goto &Locale::Maketext::Utils::Phrase::Norm::new_source; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub new_legacy_target { |
33
|
3
|
50
|
|
3
|
1
|
2202
|
my $conf = ref( $_[-1] ) eq 'HASH' ? pop(@_) : {}; |
34
|
|
|
|
|
|
|
|
35
|
3
|
|
|
|
|
11
|
$conf->{'exclude_filters'}{'Ampersand'} = 1; |
36
|
3
|
|
|
|
|
7
|
$conf->{'exclude_filters'}{'Markup'} = 1; |
37
|
|
|
|
|
|
|
|
38
|
3
|
|
|
|
|
4
|
push @_, $conf; |
39
|
3
|
|
|
|
|
13
|
goto &Locale::Maketext::Utils::Phrase::Norm::new_target; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# If they ever diverge we simply need to: |
43
|
|
|
|
|
|
|
# 1. Update POD |
44
|
|
|
|
|
|
|
# 2. probably update t/08.cpanel_norm.t |
45
|
|
|
|
|
|
|
# 3. add our own new_source() or list of defaults that SUPER::new_source would call instead of using its array or something |
46
|
|
|
|
|
|
|
# sub new_source { |
47
|
|
|
|
|
|
|
# … |
48
|
|
|
|
|
|
|
# return $_[0]->SUPER::new_source(… @non_default_list …); |
49
|
|
|
|
|
|
|
# } |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |