line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
=head2 Treex::PML::Seq::Element |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
This class implements an element of a 'sequence', i.e. a name-value |
5
|
|
|
|
|
|
|
pair. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=over 4 |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=cut |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package Treex::PML::Seq::Element; |
12
|
1
|
|
|
1
|
|
12
|
use 5.008; |
|
1
|
|
|
|
|
3
|
|
13
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
18
|
|
14
|
1
|
|
|
1
|
|
2
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
22
|
|
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
4
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
32
|
|
17
|
|
|
|
|
|
|
BEGIN { |
18
|
1
|
|
|
1
|
|
13
|
$VERSION='2.21'; # version template |
19
|
|
|
|
|
|
|
} |
20
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
142
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=item Treex::PML::Seq::Element->new (name, value) |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Create a new sequence element. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new { |
29
|
0
|
|
|
0
|
1
|
|
my ($class,$name, $value) = @_; |
30
|
0
|
|
|
|
|
|
return bless [$name,$value],$class; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item $el->name () |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Return the name of the element. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub name { |
40
|
0
|
|
|
0
|
1
|
|
$_[0]->[0]; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=item $el->value () |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Return the value of the element. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub value { |
51
|
0
|
|
|
0
|
1
|
|
$_[0]->[1]; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item $el->set_name (name) |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Set name of the element |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub set_name { |
61
|
0
|
|
|
0
|
1
|
|
$_[0]->[0] = $_[1]; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item $el->set_value (value) |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Set value of the element |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub set_value { |
71
|
0
|
|
|
0
|
1
|
|
$_[0]->[1] = $_[1]; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=back |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
__END__ |