| 1 | # London Stock Exchange 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::L; | ||
| 20 | use 5.006; | ||
| 21 | use strict; | ||
| 22 | use warnings; | ||
| 23 | use URI::Escape; | ||
| 24 | use Locale::TextDomain ('App-Chart'); | ||
| 25 | |||
| 26 | use App::Chart; | ||
| 27 | use App::Chart::Download; | ||
| 28 | use App::Chart::Sympred; | ||
| 29 | use App::Chart::TZ; | ||
| 30 | use App::Chart::Yahoo; | ||
| 31 | |||
| 32 | |||
| 33 | # .L london shares and .IL for "international order book" shares | ||
| 34 | my $pred_shares = App::Chart::Sympred::Regexp->new (qr/\.(L|IL)$/); | ||
| 35 | |||
| 36 | # ^FTSE etc | ||
| 37 | my $pred_indexes = App::Chart::Sympred::Prefix->new ('^FT'); | ||
| 38 | |||
| 39 | my $pred_any = App::Chart::Sympred::Any->new ($pred_shares, $pred_indexes); | ||
| 40 | App::Chart::TZ->london->setup_for_symbol ($pred_any); | ||
| 41 | |||
| 42 | |||
| 43 | #------------------------------------------------------------------------------ | ||
| 44 | # weblink - LSE company info | ||
| 45 | # | ||
| 46 | # This includes IOB international orderbook shares, like | ||
| 47 | # | ||
| 48 | # http://www.londonstockexchange.com/en-gb/pricesnews/prices/system/detailedprices.htm?ti=TPSD | ||
| 49 | # | ||
| 50 | |||
| 51 | App::Chart::Weblink->new | ||
| 52 | (pred => $pred_shares, | ||
| 53 | name => __('LSE _Company Information'), | ||
| 54 | desc => __('Open web browser at the London Stock Exchange page for this company'), | ||
| 55 | proc => sub { | ||
| 56 | my ($symbol) = @_; | ||
| 57 | return 'http://www.londonstockexchange.com/en-gb/pricesnews/prices/system/detailedprices.htm?ti=' | ||
| 58 | . URI::Escape::uri_escape (App::Chart::symbol_sans_suffix ($symbol)); | ||
| 59 | }); | ||
| 60 | |||
| 61 | 1; | ||
| 62 | __END__ |