line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
7863
|
use 5.10.0; |
|
1
|
|
|
|
|
3
|
|
2
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
71
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Map::Metro::Plugin::Hook::Helsinki::Swedish; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Use the Swedish station names |
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY |
9
|
|
|
|
|
|
|
our $VERSION = '0.1987'; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
12
|
1
|
|
|
1
|
|
6427
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
11
|
|
13
|
1
|
|
|
1
|
|
79
|
use Map::Metro::Hook; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
14
|
1
|
|
|
1
|
|
758
|
use Encode qw/encode_utf8 decode_utf8/; |
|
1
|
|
|
|
|
9006
|
|
|
1
|
|
|
|
|
95
|
|
15
|
1
|
|
|
1
|
|
8
|
use utf8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub register { |
18
|
|
|
|
|
|
|
before_add_station => sub { |
19
|
|
|
|
|
|
|
|
20
|
34
|
|
|
34
|
|
76733
|
my $self = shift; |
21
|
34
|
|
|
|
|
61
|
my $station = shift; |
22
|
34
|
|
|
|
|
1478
|
$station->set_name($self->station_translation($station->name)); |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
2
|
0
|
17871
|
}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub station_translation { |
28
|
34
|
|
|
34
|
0
|
390
|
my $self = shift; |
29
|
34
|
|
|
|
|
45
|
my $name = shift; |
30
|
|
|
|
|
|
|
|
31
|
34
|
|
|
|
|
539
|
my $to_swedish = { |
32
|
|
|
|
|
|
|
'Ruoholahti' => 'Gräsviken', |
33
|
|
|
|
|
|
|
'Kamppi' => 'Kampen', |
34
|
|
|
|
|
|
|
'Rautatientori' => 'Järnvägstorget', |
35
|
|
|
|
|
|
|
'Kaisaniemi' => 'Kajsaniemi', |
36
|
|
|
|
|
|
|
'Hakaniemi' => 'Hagnäs', |
37
|
|
|
|
|
|
|
'Sörnälnen' => 'Sörnäs', |
38
|
|
|
|
|
|
|
'Kalasatama' => 'Fiskhamnen', |
39
|
|
|
|
|
|
|
'Kulosaari' => 'Brändö', |
40
|
|
|
|
|
|
|
'Herttoniemi' => 'Hertonäs', |
41
|
|
|
|
|
|
|
'Siilitie' => 'Igelkottsvägen', |
42
|
|
|
|
|
|
|
'Itäkeskus' => 'Ãstra centrum', |
43
|
|
|
|
|
|
|
'Myllypuro' => 'Kvarnbäcken', |
44
|
|
|
|
|
|
|
'Kontula' => 'GÃ¥rdsbacka', |
45
|
|
|
|
|
|
|
'Mellunmäki' => 'Mellungsbacka', |
46
|
|
|
|
|
|
|
'Puotila' => 'Botby gård', |
47
|
|
|
|
|
|
|
'Rastila' => 'Rastböle', |
48
|
|
|
|
|
|
|
'Vuosaari' => 'Nordsjö', |
49
|
|
|
|
|
|
|
}; |
50
|
34
|
|
33
|
|
|
355
|
return $to_swedish->{ $name } // $name; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=pod |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=encoding UTF-8 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 NAME |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Map::Metro::Plugin::Hook::Helsinki::Swedish - Use the Swedish station names |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 VERSION |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Version 0.1987, released 2016-10-30. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SOURCE |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L<https://github.com/Csson/p5-Map-Metro-Helsinki> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 HOMEPAGE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
L<https://metacpan.org/release/Map-Metro-Plugin-Map-Helsinki> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 AUTHOR |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Erik Carlsson <info@code301.com> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Erik Carlsson. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
86
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |