blib/lib/Acme/MetaSyntactic/donmartin.pm

filter: Statementstmt 40.7% 11 / 27 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 38.2% 13 / 34 CC 3 SCAR 20.3
CC
3
Cov
35%
__ANON__
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.6
↑ Summary blib/lib/Acme/MetaSyntactic/viclones.pm »
1 =encoding iso-8859-1
2  
3 =cut
4  
5 package Acme::MetaSyntactic::donmartin;
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Acme::MetaSyntactic::List;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 our @ISA = qw( Acme::MetaSyntactic::List );
9 2 our $VERSION = '1.005';
10 2 __PACKAGE__->init();
11  
12 our %Remote = (
13 source => 'http://madcoversite.com/dmd-alphabetical.html',
14 0 ▶ extract => sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
15 return
16 # split a few items that are way too long
17 map /CHIRP_TIK_TIK_KRIK_BREET_BREET_TOOD_TOOD_KRIDIT_KRIDIT_BREET/
18 ? ( substr( $_, 0, 163 ), substr( $_, 164 ) )
19 : $_,
20 map /TIKAK_KAK_BINGCHIKA_CHUNK_THWIZZIK_ZAK/
21 ? ( substr( $_, 0, 164 ), substr( $_, 165 ) )
22 : $_,
23  
24 # pick and clean up items from the HTML table
25 map {
26 0 ▶ s/\s+/ /g;
Branch: 2 branches
BranchTrueFalseTotal
/CHIRP_TIK_TIK_KRIK_BREET_BREET_TOOD_TOOD_KRIDIT_KRIDIT_BREET/ ? : 0 0 0
/TIKAK_KAK_BINGCHIKA_CHUNK_THWIZZIK_ZAK/ ? : 0 0 0
27  
28 # remove HTML
29 0 s/<[^>]+>//g;
30 0 s/&(?:hellip|nbsp);/_/g;
31 0 s/\(etc\. etc\.\)//g;
32  
33 # do the "n times" math, but shorten items that are too long
34 0 s/twice/2 times/;
35 0 s/four times/4 times/;
36 0 s/nine times/9 times/;
37 0 s/eleven times/11 times/;
38 0 s/52 times/24 times/;
39 0 s/FOOM FWEE BOOM DOOM DING \(12 times\)/FOOM FWEE BOOM DOOM DING \(10 times\)/;
40 0 s/(.*?)\([^\)\d]*?(\d+) times[^\)]*\)/$1x$2/eg;
41  
42 # remove unsightly characters
43 0 y/-_ !'.,… /_/s;
44 0 s/^_+|_+$//g;
45  
46 # send the final result
47 0 $_;
48 }
49 $_[0] =~ m!<tr[^<]+<td[^<]+<font[^<]+size=4>\s*(.*?)\s*</font>!igs;
50 },
51 2 );
52  
53 2 1;
54  
55 =head1 NAME
56  
57 Acme::MetaSyntactic::donmartin - The Don Martin theme
58  
59 =head1 DESCRIPTION
60  
61 The sound effects from Don Martin's comics.
62  
63 The comprehensive list is found on Doug Gilford's Mad Cover Site:
64 L<http://www.madcoversite.com/dmd.html>.
65  
66 =head1 CONTRIBUTOR
67  
68 Vahe Sarkissian.
69  
70 =head1 CHANGES
71  
72 =over 4
73  
74 =item *
75  
76 2018-10-29 - v1.005
77  
78 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.052.
79  
80 =item *
81  
82 2016-03-21 - v1.004
83  
84 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.049.
85  
86 In the source material, several items that were listed independently have
87 been merged together.
88  
89 =item *
90  
91 2013-10-14 - v1.003
92  
93 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.037.
94  
95 One very long item (367 characters) is split in two smaller ones.
96  
97 =item *
98  
99 2012-06-04 - v1.002
100  
101 Updated the source URL, and updated the data from the source web site
102 in Acme-MetaSyntactic-Themes version 1.004.
103  
104 =item *
105  
106 2012-05-14 - v1.001
107  
108 Updated with an C<=encoding> pod command
109 in Acme-MetaSyntactic-Themes version 1.001.
110  
111 =item *
112  
113 2012-05-07 - v1.000
114  
115 Received its own version number in Acme-MetaSyntactic-Themes version 1.000.
116  
117 =item *
118  
119 2006-07-24
120  
121 Updated from the online list in Acme-MetaSyntactic version 0.84.
122  
123 =item *
124  
125 2006-01-30
126  
127 Flavio Poletti told me that a few onomatopoeias were missing. I didn't
128 add them, but made the list updatable from the original list URL.
129 I had to cut two items that were more than 251 character long, so that
130 list items are still valid Perl identifiers.
131  
132 List entirely updated in Acme-MetaSyntactic version 0.59.
133  
134 =item *
135  
136 2005-03-28
137  
138 Duplicates removed in Acme-MetaSyntactic version 0.15.
139  
140 =item *
141  
142 2005-01-14
143  
144 Introduced in Acme-MetaSyntactic version 0.03.
145  
146 =back
147  
148 =head1 SEE ALSO
149  
150 L<Acme::MetaSyntactic>, L<Acme::MetaSyntactic::List>.
151  
152 =cut
153  
154 __DATA__
↑ Summary blib/lib/Acme/MetaSyntactic/viclones.pm »