| 1 | package FIX::Lite::Dictionary; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 1 | my $fixDict = {}; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | sub load($) { | ||||||||||||||||||||
| 9 | 0 | ▶ | my $ver = shift; | ||||||||||||||||||
|
Subroutine
load: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 10 | 0 | ▶ | if ( !defined $fixDict->{$ver} ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 0 | require("FIX/Lite/$ver.pm"); | |||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 0 | my $f = eval "FIX::Lite::${ver}::getFix()"; | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | ## | ||||||||||||||||||||
| 17 | # parse messages,fields and components and build hashes for faster access | ||||||||||||||||||||
| 18 | # | ||||||||||||||||||||
| 19 | 0 | $f->{hMessages} = {}; | |||||||||||||||||||
| 20 | 0 | for my $a ( @{ $f->{messages} } ) { | |||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 0 | $f->{hMessages}->{ $a->{msgtype} } = $a; | |||||||||||||||||||
| 23 | 0 | $f->{hMessages}->{ $a->{name} } = $a; | |||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | 0 | $f->{hFields} = {}; | |||||||||||||||||||
| 26 | 0 | for my $a ( @{ $f->{fields} } ) { | |||||||||||||||||||
| 27 | 0 | $f->{hFields}->{ $a->{name} } = $a; | |||||||||||||||||||
| 28 | 0 | $f->{hFields}->{ $a->{number} } = $a; | |||||||||||||||||||
| 29 | } | ||||||||||||||||||||
| 30 | 0 | $f->{hComponents} = {}; | |||||||||||||||||||
| 31 | 0 | for my $a ( @{ $f->{components} } ) { | |||||||||||||||||||
| 32 | 0 | $f->{hComponents}->{ $a->{name} } = $a; | |||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 0 | $fixDict->{$ver} = $f; | |||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | } | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | sub new ($) { | ||||||||||||||||||||
| 40 | 0 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 0 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition0%0/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 43 | 0 | my $self = {}; | |||||||||||||||||||
| 44 | 0 | bless( $self, $class ); | |||||||||||||||||||
| 45 | 0 | $self = $fixDict->{FIX44}; | |||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 0 | return $self; | |||||||||||||||||||
| 48 | } | ||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | 1 | 1; | |||||||||||||||||||