App/Chart/Suffix/KQ.pm untested

filter: Statementstmt 0.0% 0 / 41 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 11 Podpod n/a totaltotal 0.0% 0 / 52 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # KOSDAQ 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::KQ;
20 use strict;
21 use warnings;
22 use URI::Escape;
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 use App::Chart::Suffix::KS;
32  
33  
34 my $pred = App::Chart::Sympred::Suffix->new ('.KQ');
35 $App::Chart::Suffix::KS::timezone_seoul ->setup_for_symbol ($pred);
36  
37  
38 #------------------------------------------------------------------------------
39 # weblink - company info
40 #
41 # Full link is
42 # http://english.kosdaq.com/enterprise/center/center.jsp?code=052300&codeInFocus=052300&selFocus=enterprise%2Fcenter%2Fcenter.jsp&x=0&y=0
43 #
44 # but it's enough to give
45 # http://english.kosdaq.com/enterprise/center/center.jsp?code=052300
46 #
47  
48 App::Chart::Weblink->new
49 (pred => $pred,
50 name => __('KOSDAQ _Company Information'),
51 desc => __('Open web browser at the KOSDAQ Exchange page for this company'),
52 proc => sub {
53 my ($symbol) = @_;
54 $symbol = URI::Escape::uri_escape(App::Chart::symbol_sans_suffix($symbol));
55 my $lang = App::Chart::Glib::Ex::MoreUtils::lang_select (ko => 'www',
56 en => 'english');
57 return
58 "http://$lang.kosdaq.com/enterprise/center/center.jsp?code=$symbol";
59 });
60  
61 1;
62 __END__