| 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.014'; | |
| 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 | 2021-04-30 - v1.014 | ||
| 48 | |||
| 49 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.055. | ||
| 50 | |||
| 51 | =item * | ||
| 52 | |||
| 53 | 2019-10-28 - v1.013 | ||
| 54 | |||
| 55 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.054. | ||
| 56 | |||
| 57 | =item * | ||
| 58 | |||
| 59 | 2019-07-29 - v1.012 | ||
| 60 | |||
| 61 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.053. | ||
| 62 | |||
| 63 | =item * | ||
| 64 | |||
| 65 | 2017-11-13 - v1.011 | ||
| 66 | |||
| 67 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.051. | ||
| 68 | |||
| 69 | =item * | ||
| 70 | |||
| 71 | 2017-06-12 - v1.010 | ||
| 72 | |||
| 73 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.050. | ||
| 74 | |||
| 75 | =item * | ||
| 76 | |||
| 77 | 2016-03-21 - v1.009 | ||
| 78 | |||
| 79 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.049. | ||
| 80 | |||
| 81 | =item * | ||
| 82 | |||
| 83 | 2015-10-19 - v1.008 | ||
| 84 | |||
| 85 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.048. | ||
| 86 | |||
| 87 | =item * | ||
| 88 | |||
| 89 | 2015-02-02 - v1.007 | ||
| 90 | |||
| 91 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.045. | ||
| 92 | |||
| 93 | =item * | ||
| 94 | |||
| 95 | 2015-01-05 - v1.006 | ||
| 96 | |||
| 97 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.044. | ||
| 98 | |||
| 99 | =item * | ||
| 100 | |||
| 101 | 2014-04-07 - v1.005 | ||
| 102 | |||
| 103 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.039. | ||
| 104 | |||
| 105 | =item * | ||
| 106 | |||
| 107 | 2013-12-09 - v1.004 | ||
| 108 | |||
| 109 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.038. | ||
| 110 | |||
| 111 | =item * | ||
| 112 | |||
| 113 | 2013-10-14 - v1.003 | ||
| 114 | |||
| 115 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.037. | ||
| 116 | |||
| 117 | =item * | ||
| 118 | |||
| 119 | 2013-07-22 - v1.002 | ||
| 120 | |||
| 121 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.034. | ||
| 122 | |||
| 123 | =item * | ||
| 124 | |||
| 125 | 2013-06-17 - v1.001 | ||
| 126 | |||
| 127 | Updated from the source web site in Acme-MetaSyntactic-Themes version 1.033. | ||
| 128 | |||
| 129 | =item * | ||
| 130 | |||
| 131 | 2012-08-27 - v1.000 | ||
| 132 | |||
| 133 | Added a remote source for the list and updated the list | ||
| 134 | in Acme-MetaSyntactic-Themes v1.016. | ||
| 135 | |||
| 136 | =item * | ||
| 137 | |||
| 138 | 2005-10-25 | ||
| 139 | |||
| 140 | Submitted by Abigail. | ||
| 141 | |||
| 142 | =back | ||
| 143 | |||
| 144 | =head1 SEE ALSO | ||
| 145 | |||
| 146 | L<Acme::MetaSyntactic>, L<Acme::MetaSyntactic::List>. | ||
| 147 | |||
| 148 | =cut | ||
| 149 | |||
| 150 | __DATA__ | ||