App/Chart/Suffix/ZAG.pm untested

filter: Statementstmt 0.0% 0 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod n/a totaltotal 0.0% 0 / 42 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Zagreb Stock Exchange (ZSE) setups. -*- coding: utf-8 -*-
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::ZAG;
20 use strict;
21 use warnings;
22 use Locale::TextDomain ('App-Chart');
23  
24 use App::Chart::Glib::Ex::MoreUtils;
25 use App::Chart;
26 use App::Chart::Sympred;
27 use App::Chart::TZ;
28 use App::Chart::Weblink;
29  
30  
31 my $timezone_zagreb = App::Chart::TZ->new
32 (name => __('Zagreb'),
33 choose => [ 'Europe/Zagreb' ],
34 fallback => 'CET-1');
35  
36 my $pred = App::Chart::Sympred::Suffix->new ('.ZAG');
37 $timezone_zagreb->setup_for_symbol ($pred);
38  
39 # App::Chart::setup_source_help
40 # ($pred, __p('manual-node','Zagreb Stock Exchange'));
41  
42  
43 #------------------------------------------------------------------------------
44 # weblink - company info
45 #
46 # eg. in Croatian and English,
47 # http://www.zse.hr/security.php?ticker=DLKV-M-704A&languageId=HR
48 # http://www.zse.hr/security.php?ticker=DLKV-M-704A&languageId=EN
49  
50 App::Chart::Weblink->new
51 (pred => $pred,
52 name => __('ZSE _Company Information'),
53 desc => __('Open web browser at the Zagreb Stock Exchange information page for this company'),
54 proc => sub {
55 my ($symbol) = @_;
56 $symbol = URI::Escape::uri_escape(App::Chart::symbol_sans_suffix($symbol));
57 my $lang = App::Chart::Glib::Ex::MoreUtils::lang_select (hr => 'HR',
58 en => 'EN');
59 return "http://www.zse.hr/security.php?ticker=$symbol&languageId=$lang";
60 });
61  
62  
63  
64 1;
65 __END__