line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Protocol::FIX::TagsAccessor; |
2
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
74
|
use strict; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
298
|
|
4
|
11
|
|
|
11
|
|
49
|
use warnings; |
|
11
|
|
|
|
|
23
|
|
|
11
|
|
|
|
|
1968
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.07'; ## VERSION |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Protocol::FIX::TagsAccessor - access to tags of deserialized FIX messages |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 METHODS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head3 new |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
new($class, $tag_pairs) |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Creates new TagsAccessor (performed by Parser). Not for direct usage |
21
|
|
|
|
|
|
|
by end-users. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new { |
26
|
54
|
|
|
54
|
1
|
142
|
my ($class, $tag_pairs) = @_; |
27
|
54
|
|
|
|
|
77
|
my %by_name; |
28
|
54
|
|
|
|
|
138
|
for (my $idx = 0; $idx < @$tag_pairs; $idx += 2) { |
29
|
134
|
|
|
|
|
203
|
my $composite = $tag_pairs->[$idx]; |
30
|
|
|
|
|
|
|
# value is either value (i.e. string) or another TagAccessor |
31
|
134
|
|
|
|
|
211
|
my $value = $tag_pairs->[$idx + 1]; |
32
|
134
|
|
|
|
|
401
|
$by_name{$composite->{name}} = $value; |
33
|
|
|
|
|
|
|
} |
34
|
54
|
|
|
|
|
197
|
return bless \%by_name, $class; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head3 value |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
value($self, $name) |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Returns value. Please, refer to L |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub value { |
46
|
82
|
|
|
82
|
1
|
5413
|
my ($self, $name) = @_; |
47
|
82
|
|
|
|
|
333
|
return $self->{$name}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |