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