App/Chart/Suffix/LIFFE.pm untested

filter: Statementstmt 0.0% 0 / 37 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod n/a totaltotal 0.0% 0 / 46 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # !!! long way from working ...
2  
3  
4 # LIFFE setups.
5  
6 # Copyright 2007, 2008, 2009, 2010 Kevin Ryde
7  
8 # This file is part of Chart.
9 #
10 # Chart is free software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 3, or (at your option) any later version.
13 #
14 # Chart is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 # details.
18 #
19 # You should have received a copy of the GNU General Public License along
20 # with Chart. If not, see <http://www.gnu.org/licenses/>.
21  
22 package App::Chart::Suffix::LIFFE;
23 use strict;
24 use warnings;
25 use Locale::TextDomain 'App-Chart';
26  
27 use App::Chart::Glib::Ex::MoreUtils;
28 use App::Chart;
29 use App::Chart::Barchart;
30 use App::Chart::Sympred;
31 use App::Chart::TZ;
32 use App::Chart::Weblink;
33  
34  
35 my $pred = App::Chart::Sympred::Suffix->new ('.LIFFE');
36 App::Chart::TZ->london->setup_for_symbol ($pred);
37  
38 $App::Chart::Barchart::intraday_pred->add ($pred);
39 $App::Chart::Barchart::fiveday_pred->add ($pred);
40  
41  
42 #------------------------------------------------------------------------------
43 # weblink - contract specs
44  
45 # FIXME: but LON, PAR, AMS in weblink ...
46  
47 App::Chart::Weblink->new
48 (pred => $pred,
49 name => __("LIFFE _Contract Specifications"),
50 desc => __("Open web browser at the LIFFE contract specifications for this commodity."),
51 proc => sub {
52 my ($symbol) = @_;
53 my $commodity = App::Chart::symbol_commodity ($symbol);
54 my $lang = App::Chart::Glib::Ex::MoreUtils::lang_select (en => 'EN',
55 fr => 'FR',
56 nl => 'NL',
57 pt => 'PT');
58 return "http://www.euronext.com/trader/contractspecifications/derivative/wide/contractspecifications-2864-$lang.html?euronextCode=$commodity-PAR-FUT";
59 });
60  
61 1;
62 __END__