App/Chart/Suffix/BK.pm untested

filter: Statementstmt 0.0% 0 / 38 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod n/a totaltotal 0.0% 0 / 48 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Stock Exchange of Thailand setups.
2  
3 # Copyright 2005, 2006, 2007, 2008, 2009, 2010 Kevin Ryde
4  
5 # This file is part of Chart.
6 #
7 # Chart is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3, or (at your option) any later version.
10 #
11 # Chart is distributed in the hope that it will be useful, but WITHOUT ANY
12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 # details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with Chart. If not, see <http://www.gnu.org/licenses/>.
18  
19 package App::Chart::Suffix::BK;
20 use 5.006;
21 use strict;
22 use warnings;
23 use Locale::TextDomain 'App-Chart';
24  
25 use App::Chart::Glib::Ex::MoreUtils;
26 use App::Chart;
27 use App::Chart::Sympred;
28 use App::Chart::TZ;
29 use App::Chart::Weblink;
30 use App::Chart::Yahoo;
31  
32  
33 my $timezone_bangkok = App::Chart::TZ->new
34 (name => __('Bangkok'),
35 choose => [ 'Asia/Bangkok' ],
36 fallback => 'ICT-7');
37  
38 # Indexes:
39 # ^THDOW
40 # ^THDOWD
41 # ^DWTH
42 # ^DWTHD
43 # ^DWTHT
44 # ^DWTHTD
45 # old ^SETI seems gone
46 #
47 my $pred_indexes = App::Chart::Sympred::Regexp->new (qr/^\^(DW)?TH/);
48  
49 # .BK seems gone as of Mar 2007
50 my $pred_shares = App::Chart::Sympred::Suffix->new ('.BK');
51  
52 my $pred_any = App::Chart::Sympred::Any->new ($pred_indexes, $pred_shares);
53 $timezone_bangkok->setup_for_symbol ($pred_any);
54  
55 # @item
56 # @item @nisamp{.BK} @tab Thailand
57 # @cindex @code{.BK}
58 # @cindex Stock Exchange of Thailand
59 # @cindex SET
60 # @cindex Thailand
61 # @tab Stock Exchange of Thailand (SET) @*
62 # @uref{http://www.set.or.th/en/index.html}
63  
64 #------------------------------------------------------------------------------
65 # weblink - only home page for now
66 #
67  
68 # only home page for now ...
69 App::Chart::Weblink->new
70 (pred => $pred_any,
71 name => __('_SET Home Page'),
72 desc => __('Open web browser at the Stock Exchange of Thailand home page'),
73 url => App::Chart::Glib::Ex::MoreUtils::lang_select
74 ('th' => 'http://www.set.or.th',
75 'en' => 'http://www.set.or.th/en/index.html'));
76  
77 1;
78 __END__