blib/lib/Acme/MetaSyntactic/olympics.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 4 / 4 Conditioncond 75.0% 3 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 90.6% 29 / 32 CC 1 SCAR 0.0
CC
1
Cov
96%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Acme/MetaSyntactic/pause_id.pm ↑ Summary blib/lib/Acme/MetaSyntactic/unicode.pm »
1 package Acme::MetaSyntactic::olympics;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use Acme::MetaSyntactic::MultiList;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 our @ISA = qw( Acme::MetaSyntactic::MultiList );
5 2 our $VERSION = '1.002';
6  
7 =head1 NAME
8  
9 Acme::MetaSyntactic::olympics - Olympic cities theme
10  
11 =head1 DESCRIPTION
12  
13 This theme lists the cities who have hosted, or will host, Olympic Games.
14 Cities for both the Summer and Winter games are listed.
15  
16 The list was originally fetched from L<http://www.olympic.org/>.
17  
18 The following cities have held, or will hold, the Olympic games:
19  
20 =cut
21  
22 {
23 2 my $data;
24 my $season;
25  
26 2 for my $line ( split /\n/ => <<'=cut' ) {
27  
28 =pod
29  
30 Summer Games
31 ============
32  
33 2020 Tokyo
34 2016 Rio de Janeiro
35 2012 London
36 2008 Beijing
37 2004 Athens
38 2000 Sydney
39 1996 Atlanta
40 1992 Barcelona
41 1988 Seoul
42 1984 Los Angeles
43 1980 Moscow
44 1976 Montreal
45 1972 Munich
46 1968 Mexico City
47 1964 Tokyo
48 1960 Rome
49 1956 Melbourne
50 1952 Helsinki
51 1948 London
52 1936 Berlin
53 1932 Los Angeles
54 1928 Amsterdam
55 1924 Paris
56 1920 Antwerp
57 1912 Stockholm
58 1908 London
59 1904 Saint-Louis
60 1900 Paris
61 1896 Athens
62  
63  
64 Winter Games
65 ============
66  
67 2018 Pyeongchang
68 2014 Sochi
69 2010 Vancouver
70 2006 Torino
71 2002 Salt Lake City
72 1998 Nagano
73 1994 Lillehammer
74 1992 Albertville
75 1988 Calgary
76 1984 Sarajevo
77 1980 Lake Placid
78 1976 Innsbruck
79 1972 Sapporo
80 1968 Grenoble
81 1964 Innsbruck
82 1960 Squaw Valley
83 1956 Cortina d'Ampezzo
84 1952 Oslo
85 1948 Saint-Moritz
86 1936 Garmisch-Partenkirchen
87 1932 Lake Placid
88 1928 Saint-Moritz
89 1924 Chamonix
90  
91 =cut
92  
93 126 ▶ $season = lc $1 and next if $line =~ /(\w+) Games/;
Branch: 1 branch
BranchTrueFalseTotal
if $line =~ /(\w+) Games/ 4 122 126
Condition75%3/4
$line =~ /(\w+) Games/ && (($season = lc $1) && (next))
!ll
1224
$season = lc $1 and next
!ll
04
MC/DC0%0/2
$line =~ /(\w+) Games/ && (($season = lc $1) && (next))
$line =~ /(\w+) Games/ $season = lc $1
Truth table33%1/3
A && B
A= $line =~ /(\w+) Games/B= $season = lc $1
ABresult
0X0
100
111
94 122 ▶ next if $line !~ /^\s+(\d+)\s+(.*)/;
Branch: 1 branch
BranchTrueFalseTotal
unless $line =~ /^\s+(\d+)\s+(.*)/ 18 104 122
95 104 my ( $year, $city ) = ( $1, $2 );
96 104 $city =~ s/\W+/_/g;
97 104 $data->{names}{$year}{$season} = $city;
98 104 $data->{names}{$season}{$year} = $city;
99 }
100 2 $data->{default} = ':all';
101  
102 2 __PACKAGE__->init($data);
103 }
104  
105 2 1;
106  
107 __END__
« blib/lib/Acme/MetaSyntactic/pause_id.pm ↑ Summary blib/lib/Acme/MetaSyntactic/unicode.pm »