line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Locale::Maketext::Utils::Phrase::cPanel; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
15930
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
55
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
69
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$Locale::Maketext::Utils::Phrase::cPanel::VERSION = '0.1'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
398
|
use Locale::Maketext::Utils::Phrase::Norm (); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
49
|
|
9
|
2
|
|
|
2
|
|
9
|
use base 'Locale::Maketext::Utils::Phrase::Norm'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
200
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Mock Cpanel::Locale-specific bracket notation methods for the filters’ default maketext object: |
12
|
2
|
|
|
2
|
|
854
|
use Locale::Maketext::Utils::Mock (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
250
|
|
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
|
1380
|
my $conf = ref( $_[-1] ) eq 'HASH' ? pop(@_) : {}; |
24
|
|
|
|
|
|
|
|
25
|
3
|
|
|
|
|
6
|
$conf->{'exclude_filters'}{'Ampersand'} = 1; |
26
|
3
|
|
|
|
|
4
|
$conf->{'exclude_filters'}{'Markup'} = 1; |
27
|
|
|
|
|
|
|
|
28
|
3
|
|
|
|
|
4
|
push @_, $conf; |
29
|
3
|
|
|
|
|
9
|
goto &Locale::Maketext::Utils::Phrase::Norm::new_source; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub new_legacy_target { |
33
|
3
|
50
|
|
3
|
1
|
1375
|
my $conf = ref( $_[-1] ) eq 'HASH' ? pop(@_) : {}; |
34
|
|
|
|
|
|
|
|
35
|
3
|
|
|
|
|
6
|
$conf->{'exclude_filters'}{'Ampersand'} = 1; |
36
|
3
|
|
|
|
|
4
|
$conf->{'exclude_filters'}{'Markup'} = 1; |
37
|
|
|
|
|
|
|
|
38
|
3
|
|
|
|
|
3
|
push @_, $conf; |
39
|
3
|
|
|
|
|
8
|
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__ |