blib/lib/Acme/MetaSyntactic/wales_towns.pm

filter: Statementstmt 55.0% 11 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 56.5% 13 / 23 CC 1 SCAR 2.9
CC
1
Cov
55%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Acme/MetaSyntactic/pokemon.pm ↑ Summary blib/lib/Acme/MetaSyntactic/ben_and_jerry.pm »
1 package Acme::MetaSyntactic::wales_towns;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use Acme::MetaSyntactic::List;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 our @ISA = qw( Acme::MetaSyntactic::List );
5 2 our $VERSION = '1.013';
6 2 __PACKAGE__->init();
7  
8 our %Remote = (
9 source => 'http://en.wikipedia.org/wiki/List_of_towns_in_Wales',
10 extract => sub {
11 0 ▶ my $list = shift;
Subroutine __ANON__: not called CC=1 SCAR=6.9
12 0 $list =~ s{\A.*<span class="mw-headline" id="A">A</span>}{}s;
13 0 $list =~ s{<span [^>]*>Notes</span>.*}{}s;
14 0 $list =~ s{<span [^>]*>See also</span>.*}{}s;
15 0 return map { s/_+/_/g; s/^_|_$//g; $_ }
16 0 map { Acme::MetaSyntactic::RemoteList::tr_nonword($_) }
17 $list =~ m{<a href="/wiki/[^"]*" title="[^"]*"[^>]*>([^<]+)</a>}g;
18 },
19 2 );
20  
21 2 1;
22  
23 =head1 NAME
24  
25 Acme::MetaSyntactic::wales_towns - Towns in Wales
26  
27 =head1 DESCRIPTION
28  
29 List of towns in Wales.
30  
31 It would be nice to extend this to a list of all towns and villages
32 in Wales, if only to be able to include
33 Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch.
34  
35 Source: L<http://en.wikipedia.org/wiki/List_of_towns_in_Wales>.
36  
37 =head1 CONTRIBUTORS
38  
39 Abigail, Philippe Bruhat (BooK).
40  
41 =head1 CHANGES
42  
43 =over 4
44  
45 =item *
46  
47 2019-10-28 - v1.013
48  
49 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.054.
50  
51 =item *
52  
53 2019-07-29 - v1.012
54  
55 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.053.
56  
57 =item *
58  
59 2017-11-13 - v1.011
60  
61 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.051.
62  
63 =item *
64  
65 2017-06-12 - v1.010
66  
67 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.050.
68  
69 =item *
70  
71 2016-03-21 - v1.009
72  
73 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.049.
74  
75 =item *
76  
77 2015-10-19 - v1.008
78  
79 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.048.
80  
81 =item *
82  
83 2015-02-02 - v1.007
84  
85 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.045.
86  
87 =item *
88  
89 2015-01-05 - v1.006
90  
91 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.044.
92  
93 =item *
94  
95 2014-04-07 - v1.005
96  
97 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.039.
98  
99 =item *
100  
101 2013-12-09 - v1.004
102  
103 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.038.
104  
105 =item *
106  
107 2013-10-14 - v1.003
108  
109 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.037.
110  
111 =item *
112  
113 2013-07-22 - v1.002
114  
115 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.034.
116  
117 =item *
118  
119 2013-06-17 - v1.001
120  
121 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.033.
122  
123 =item *
124  
125 2012-08-27 - v1.000
126  
127 Added a remote source for the list and updated the list
128 in Acme-MetaSyntactic-Themes v1.016.
129  
130 =item *
131  
132 2005-10-25
133  
134 Submitted by Abigail.
135  
136 =back
137  
138 =head1 SEE ALSO
139  
140 L<Acme::MetaSyntactic>, L<Acme::MetaSyntactic::List>.
141  
142 =cut
143  
144 __DATA__
« blib/lib/Acme/MetaSyntactic/pokemon.pm ↑ Summary blib/lib/Acme/MetaSyntactic/ben_and_jerry.pm »