| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Locale::Framework; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
29515
|
use 5.006; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
40
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
34
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
7
|
|
|
|
1
|
|
|
|
|
41
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
579
|
use Locale::Framework::Dumb; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
44
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.06'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
require Exporter; |
|
12
|
1
|
|
|
1
|
|
5
|
use base qw(Exporter); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
111
|
|
|
13
|
1
|
|
|
1
|
|
4
|
use vars qw(@EXPORT); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
329
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
@EXPORT = qw(_T); |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $backend=new Locale::Framework::Dumb; |
|
18
|
|
|
|
|
|
|
my $language="en"; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
|
21
|
1
|
|
|
1
|
0
|
11
|
my $class=shift; |
|
22
|
1
|
|
|
|
|
3
|
my $self; |
|
23
|
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
3
|
$self->{"nil"}=1; |
|
25
|
1
|
|
|
|
|
4
|
bless $self,$class; |
|
26
|
1
|
|
|
|
|
3
|
return $self; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub init { |
|
30
|
0
|
|
|
0
|
1
|
0
|
my $self=shift; |
|
31
|
0
|
|
|
|
|
0
|
my $lang_backend; |
|
32
|
0
|
0
|
|
|
|
0
|
if (ref($self) eq "Locale::Framework") { |
|
33
|
0
|
|
|
|
|
0
|
$lang_backend=shift; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
else { |
|
36
|
0
|
|
|
|
|
0
|
$lang_backend=$self; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
0
|
|
|
|
|
0
|
$backend=$lang_backend; |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _T { |
|
42
|
3
|
|
|
3
|
|
10
|
my $text=shift; |
|
43
|
3
|
50
|
|
|
|
10
|
if (ref($text) eq "Locale::Framework") { |
|
44
|
0
|
|
|
|
|
0
|
$text=shift; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
3
|
|
|
|
|
12
|
return $backend->translate($language,$text); |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub clear_cache { |
|
50
|
1
|
|
|
1
|
1
|
6
|
$backend->clear_cache(); |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub language { |
|
54
|
2
|
|
|
2
|
1
|
5
|
my $l=shift; |
|
55
|
2
|
50
|
|
|
|
13
|
if (ref($l) eq "Locale::Framework") { |
|
56
|
2
|
|
|
|
|
4
|
$l=shift; |
|
57
|
|
|
|
|
|
|
} |
|
58
|
2
|
|
|
|
|
6
|
$language=$l; |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub set_translation { |
|
62
|
1
|
50
|
|
1
|
1
|
5
|
if (ref($_[0]) eq "Locale::Framework") { |
|
63
|
0
|
|
|
|
|
0
|
shift; |
|
64
|
|
|
|
|
|
|
} |
|
65
|
1
|
|
|
|
|
6
|
$backend->set_translation($language,@_); |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
|
70
|
|
|
|
|
|
|
__END__ |