App/Chart/Suffix/SICOM.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod n/a totaltotal 0.0% 0 / 36 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Singapore Commodities Exchange (SICOM) setups.
2  
3 # Copyright 2005, 2006, 2007, 2008, 2009 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::SICOM;
20 use strict;
21 use warnings;
22 use Locale::TextDomain 'App-Chart';
23  
24 use App::Chart;
25 use App::Chart::Sympred;
26 use App::Chart::TZ;
27 use App::Chart::Weblink;
28  
29  
30 my $pred = App::Chart::Sympred::Suffix->new ('.SICOM');
31 App::Chart::TZ->tokyo->setup_for_symbol ($pred);
32  
33 # (source-help! sicom-symbol?
34 # __p('manual-node','Singapore Commodities Exchange'))
35  
36  
37 #------------------------------------------------------------------------------
38 # weblink - contract specifications
39 #
40 # These links are as per the home page and they open in a frame. The
41 # individual pages are http://www.sicom.com.sg/robusta.htm etc.
42  
43 my %specs = ('RS' => 'http://www.sicom.com.sg/index_sub.asp?content=rss1',
44 'RT' => 'http://www.sicom.com.sg/index_sub.asp?content=rss3',
45 'TF' => 'http://www.sicom.com.sg/index_sub.asp?content=tsr20',
46 'RI' => 'http://www.sicom.com.sg/index_sub.asp?content=rss3index',
47 'CF' => 'http://www.sicom.com.sg/index_sub.asp?content=robusta');
48  
49 App::Chart::Weblink->new
50 (pred => $pred,
51 name => __("SICOM _Contract Specifications"),
52 desc => __("Open web browser at the Singapore Commodities Exchange contract specifications for this commodity"),
53 proc => sub {
54 my ($symbol) = @_;
55 my $commodity = App::Chart::symbol_commodity ($symbol);
56 return $specs{$commodity};
57 });
58  
59 1;
60 __END__