| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Finance::Symbology::Convention::CMS; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
39
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
1355
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.2; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $template = { |
|
9
|
|
|
|
|
|
|
'Preferred' => { |
|
10
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PR)$/, |
|
11
|
|
|
|
|
|
|
template => ' PR' |
|
12
|
|
|
|
|
|
|
}, |
|
13
|
|
|
|
|
|
|
'Preferred Class' => { |
|
14
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PR)([A-Z])$/, |
|
15
|
|
|
|
|
|
|
template => ' PR=CLASS=', |
|
16
|
|
|
|
|
|
|
class => 3 |
|
17
|
|
|
|
|
|
|
}, |
|
18
|
|
|
|
|
|
|
'Class' => { |
|
19
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s([A-Z])$/ , |
|
20
|
|
|
|
|
|
|
template => ' =CLASS=', |
|
21
|
|
|
|
|
|
|
class => 2 |
|
22
|
|
|
|
|
|
|
}, |
|
23
|
|
|
|
|
|
|
'Preferred when distributed' => { |
|
24
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PRWD)$/, |
|
25
|
|
|
|
|
|
|
template => ' PRWD' |
|
26
|
|
|
|
|
|
|
}, |
|
27
|
|
|
|
|
|
|
'When distributed' => { |
|
28
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(WD)$/, |
|
29
|
|
|
|
|
|
|
template => ' WD' |
|
30
|
|
|
|
|
|
|
}, |
|
31
|
|
|
|
|
|
|
'Warrants' => { |
|
32
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(WS)$/, |
|
33
|
|
|
|
|
|
|
template => ' WS' |
|
34
|
|
|
|
|
|
|
}, |
|
35
|
|
|
|
|
|
|
'Warrants Class' => { |
|
36
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(WS)([A-Z])$/, |
|
37
|
|
|
|
|
|
|
template => ' WS=CLASS=', |
|
38
|
|
|
|
|
|
|
class => 3 |
|
39
|
|
|
|
|
|
|
}, |
|
40
|
|
|
|
|
|
|
'Called' => { |
|
41
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(CL)$/, |
|
42
|
|
|
|
|
|
|
template => ' CL' |
|
43
|
|
|
|
|
|
|
}, |
|
44
|
|
|
|
|
|
|
'Class Called' => { |
|
45
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s([A-Z])(CL)$/, |
|
46
|
|
|
|
|
|
|
template => ' =CLASSCL', |
|
47
|
|
|
|
|
|
|
class => 2 |
|
48
|
|
|
|
|
|
|
}, |
|
49
|
|
|
|
|
|
|
'Preferred Called' => { |
|
50
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PRCL)$/, |
|
51
|
|
|
|
|
|
|
template => ' PRCL' |
|
52
|
|
|
|
|
|
|
}, |
|
53
|
|
|
|
|
|
|
'Preferred Class Called' => { |
|
54
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PR([A-Z])CL)$/, |
|
55
|
|
|
|
|
|
|
template => ' PR=CLASS=CL', |
|
56
|
|
|
|
|
|
|
class => 3 |
|
57
|
|
|
|
|
|
|
}, |
|
58
|
|
|
|
|
|
|
'Preferred Class When Issued' => { |
|
59
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PR([A-Z])WI)$/, |
|
60
|
|
|
|
|
|
|
template => ' PR=CLASS=WI' |
|
61
|
|
|
|
|
|
|
}, |
|
62
|
|
|
|
|
|
|
'Emerging Company Marketplace' => { |
|
63
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(EC)$/, |
|
64
|
|
|
|
|
|
|
template => ' EC' |
|
65
|
|
|
|
|
|
|
}, |
|
66
|
|
|
|
|
|
|
'Partial Paid' => { |
|
67
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PP)$/, |
|
68
|
|
|
|
|
|
|
template => ' PP' |
|
69
|
|
|
|
|
|
|
}, |
|
70
|
|
|
|
|
|
|
'Convertible' => { |
|
71
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(CV)$/, |
|
72
|
|
|
|
|
|
|
template => ' CV' |
|
73
|
|
|
|
|
|
|
}, |
|
74
|
|
|
|
|
|
|
'Convertible Called' => { |
|
75
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(CVCL)$/, |
|
76
|
|
|
|
|
|
|
template => ' CVCL' |
|
77
|
|
|
|
|
|
|
}, |
|
78
|
|
|
|
|
|
|
'Class Convertible' => { |
|
79
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s([A-Z])(CV)$/, |
|
80
|
|
|
|
|
|
|
template => ' =CLASS=CV', |
|
81
|
|
|
|
|
|
|
class => 2 |
|
82
|
|
|
|
|
|
|
}, |
|
83
|
|
|
|
|
|
|
'Preferred Class Convertible' => { |
|
84
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PR([A-Z])CV)$/, |
|
85
|
|
|
|
|
|
|
template => ' PR=CLASS=CV', |
|
86
|
|
|
|
|
|
|
class => 3 |
|
87
|
|
|
|
|
|
|
}, |
|
88
|
|
|
|
|
|
|
'Preferred Class When Distributed' => { |
|
89
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PR([A-Z])WD)$/, |
|
90
|
|
|
|
|
|
|
template => ' PR=CLASS=WD', |
|
91
|
|
|
|
|
|
|
class => 3 |
|
92
|
|
|
|
|
|
|
}, |
|
93
|
|
|
|
|
|
|
'Rights' => { |
|
94
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(RT)$/, |
|
95
|
|
|
|
|
|
|
template => ' RT' |
|
96
|
|
|
|
|
|
|
}, |
|
97
|
|
|
|
|
|
|
'Units' => { |
|
98
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(U)$/, |
|
99
|
|
|
|
|
|
|
template => ' U' |
|
100
|
|
|
|
|
|
|
}, |
|
101
|
|
|
|
|
|
|
'When Issued' => { |
|
102
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(WI)$/, |
|
103
|
|
|
|
|
|
|
template => ' WI' |
|
104
|
|
|
|
|
|
|
}, |
|
105
|
|
|
|
|
|
|
'Rights When Issued' => { |
|
106
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(RTWI)$/, |
|
107
|
|
|
|
|
|
|
template => ' RTWI' |
|
108
|
|
|
|
|
|
|
}, |
|
109
|
|
|
|
|
|
|
'Preferred When Issued' => { |
|
110
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(PRWI)$/, |
|
111
|
|
|
|
|
|
|
template => ' PRWI' |
|
112
|
|
|
|
|
|
|
}, |
|
113
|
|
|
|
|
|
|
'Class When Issued' => { |
|
114
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s([A-Z])(WI)$/, |
|
115
|
|
|
|
|
|
|
template => ' =CLASS=WI', |
|
116
|
|
|
|
|
|
|
class => 2 |
|
117
|
|
|
|
|
|
|
}, |
|
118
|
|
|
|
|
|
|
'Warrant When Issued' => { |
|
119
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(WSWI)$/, |
|
120
|
|
|
|
|
|
|
template => ' WSWI' |
|
121
|
|
|
|
|
|
|
}, |
|
122
|
|
|
|
|
|
|
'TEST Symbol' => { |
|
123
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)\s(TEST)$/, |
|
124
|
|
|
|
|
|
|
template => ' TEST' |
|
125
|
|
|
|
|
|
|
} |
|
126
|
|
|
|
|
|
|
}; |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
sub check { |
|
129
|
7
|
|
|
7
|
0
|
13
|
my ($self, $symbol) = @_; |
|
130
|
|
|
|
|
|
|
|
|
131
|
7
|
|
|
|
|
10
|
for my $type (keys %{$template}){ |
|
|
7
|
|
|
|
|
40
|
|
|
132
|
128
|
100
|
|
|
|
628
|
if (my @matches = $symbol =~ m/$template->{$type}{pattern}/){ |
|
133
|
4
|
50
|
|
|
|
14
|
my @class = splice(@matches,$template->{$type}{class}-1,1) |
|
134
|
|
|
|
|
|
|
if defined $template->{$type}{class}; |
|
135
|
|
|
|
|
|
|
|
|
136
|
4
|
|
|
|
|
594
|
my $returnObj; |
|
137
|
4
|
|
|
|
|
12
|
$returnObj->{type} = $type; |
|
138
|
4
|
|
|
|
|
9
|
$returnObj->{symbol} = shift @matches; |
|
139
|
4
|
50
|
|
|
|
12
|
$returnObj->{class} = shift @class if defined $class[0]; |
|
140
|
4
|
50
|
|
|
|
16
|
$returnObj->{suffix} = shift @matches if defined $matches[0]; |
|
141
|
|
|
|
|
|
|
|
|
142
|
4
|
|
|
|
|
18
|
return $returnObj; |
|
143
|
|
|
|
|
|
|
} |
|
144
|
|
|
|
|
|
|
} |
|
145
|
3
|
|
|
|
|
16
|
return undef; |
|
146
|
|
|
|
|
|
|
} |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
sub convert { |
|
149
|
7
|
|
|
7
|
0
|
10
|
my ($self, $obj) = @_; |
|
150
|
|
|
|
|
|
|
|
|
151
|
7
|
|
|
|
|
18
|
my $outline = $template->{$obj->{type}}{template}; |
|
152
|
|
|
|
|
|
|
|
|
153
|
7
|
50
|
|
|
|
15
|
return -1 unless defined $outline; |
|
154
|
|
|
|
|
|
|
|
|
155
|
7
|
100
|
|
|
|
24
|
$outline =~ s/=CLASS=/$obj->{class}/ |
|
156
|
|
|
|
|
|
|
if defined $obj->{class}; |
|
157
|
|
|
|
|
|
|
|
|
158
|
7
|
|
|
|
|
28
|
return $obj->{symbol}.$outline; |
|
159
|
|
|
|
|
|
|
} |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
1; |