line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::Option; |
2
|
5
|
|
|
5
|
|
33
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
145
|
|
3
|
5
|
|
|
5
|
|
30
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
1302
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new |
8
|
|
|
|
|
|
|
{ |
9
|
108
|
|
|
108
|
1
|
200
|
my ($class,$name,$value) = @_; |
10
|
108
|
|
|
|
|
159
|
my $this = {}; |
11
|
108
|
|
|
|
|
171
|
bless ($this,$class); |
12
|
108
|
|
|
|
|
214
|
$this->{NAME} = $name; |
13
|
108
|
|
|
|
|
178
|
$this->{VALUE} = $value; |
14
|
108
|
|
|
|
|
443
|
return $this; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub getName |
18
|
|
|
|
|
|
|
{ |
19
|
0
|
|
|
0
|
1
|
0
|
my ($this) = @_; |
20
|
0
|
|
|
|
|
0
|
return $this->{NAME}; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub getValue |
25
|
|
|
|
|
|
|
{ |
26
|
783
|
|
|
783
|
1
|
1410
|
my ($this) = @_; |
27
|
783
|
|
|
|
|
3390
|
return $this->{VALUE}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub update |
31
|
|
|
|
|
|
|
{ |
32
|
4
|
|
|
4
|
1
|
15
|
my ($this,$new_value,$message_set,$display_language) = @_; |
33
|
4
|
|
|
|
|
15
|
my $old_value = $this->getValue; |
34
|
4
|
|
|
|
|
12
|
$this->{VALUE} = $new_value; |
35
|
4
|
50
|
|
|
|
32
|
if(defined $message_set) |
36
|
|
|
|
|
|
|
{ |
37
|
0
|
|
|
|
|
|
print STDERR "WARNING: " . $this->getName . ": " . $message_set->getMessage('OPTION_VALUE_UPDATE')->getContent($display_language) . "\"" . $new_value . "\" ("; |
38
|
0
|
|
|
|
|
|
print STDERR $message_set->getMessage('OLD_OPTION_VALUE')->getContent($display_language) . "\"". $old_value . "\")\n"; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |