blib/lib/Acme/MetaSyntactic/services.pm

filter: Statementstmt 64.7% 11 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 65.0% 13 / 20 CC 1 SCAR 2.9
CC
1
Cov
65%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/Acme/MetaSyntactic/pm_groups.pm ↑ Summary blib/lib/Acme/MetaSyntactic/tld.pm »
1 package Acme::MetaSyntactic::services;
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.009';
6 2 __PACKAGE__->init();
7  
8 our %Remote = (
9 source => 'http://www.insecure.org/nmap/data/nmap-services',
10 0 ▶ extract => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
11 0 return grep {/^\D/}
12 0 map { s/[#\s].*//; y!-:.+/*!_!; s/__+/_/g; $_ }
13 $_[0] =~ m!^(\S+)!gm;
14 },
15 2 );
16  
17 2 1;
18  
19 =head1 NAME
20  
21 Acme::MetaSyntactic::services - The services theme
22  
23 =head1 DESCRIPTION
24  
25 The names of the services usually found in F</etc/services>.
26  
27 The first list came from my Debian system and was extracted with:
28  
29 perl -lane '$_=$F[0];y/-/_/;!/#/&&!$s{$_}++&&print' /etc/services
30  
31 Which was then golfed down to:
32  
33 perl -lane '$_=$F[0];y/-/_/;!/#/&&$s{$_}++||print' /etc/services
34 perl -lane '$_=$F[0];y/-/_/;/#/||$s{$_}++||print' /etc/services
35 perl -ne 's/\s.*//;y/-/_/;/#/||$s{$_}++||print' /etc/services
36 perl -pe 's/[#\s].*//;y/-/_/;$s{$_}++&&goto LINE' /etc/services
37 perl -ne 's/[#\s].*//;y/-/_/;$s{$_}++||print' /etc/services
38  
39 For version 0.68, this was golfed a little more, by using the symbol
40 table as the hash table it is:
41  
42 perl -ne 's/[#\s].*//;y/-/_/;$$_++||print' /etc/services
43  
44 The reference list is given by the IANA, and available at
45 L<http://www.iana.org/assignments/port-numbers>.
46  
47 A bigger services lists is used by B<nmap>:
48 L<http://www.insecure.org/nmap/data/nmap-services>.
49 This list is used to update the theme.
50  
51 =head1 CONTRIBUTOR
52  
53 Philippe "BooK" Bruhat.
54  
55 =head1 CHANGES
56  
57 =over 4
58  
59 =item *
60  
61 2026-01-12 - v1.009
62  
63 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.056.
64  
65 =item *
66  
67 2021-04-30 - v1.008
68  
69 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.055.
70  
71 =item *
72  
73 2019-07-29 - v1.007
74  
75 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.053.
76  
77 =item *
78  
79 2018-10-29 - v1.006
80  
81 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.052.
82  
83 =item *
84  
85 2017-06-12 - v1.005
86  
87 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.050.
88  
89 =item *
90  
91 2015-10-19 - v1.004
92  
93 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.048.
94  
95 =item *
96  
97 2015-06-08 - v1.003
98  
99 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.046.
100  
101 =item *
102  
103 2014-10-13 - v1.002
104  
105 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.043.
106  
107 =item *
108  
109 2014-08-18 - v1.001
110  
111 Changed the source link to use the services list from nmap,
112 as the I<graffiti.com> site seems to have disappeared.
113  
114 Updated from the source web site in Acme-MetaSyntactic-Themes version 1.041.
115  
116 =item *
117  
118 2012-05-07 - v1.000
119  
120 Received its own version number in Acme-MetaSyntactic-Themes version 1.000.
121  
122 =item *
123  
124 2006-07-24
125  
126 Updated with a link to the IANA list in Acme-MetaSyntactic version 0.84.
127  
128 =item *
129  
130 2006-04-03
131  
132 Updated and made automatically updatable with the I<graffiti.com> list
133 in Acme-MetaSyntactic version 0.68.
134  
135 This increased the theme size by a factor of 14.
136  
137 =item *
138  
139 2005-08-01
140  
141 Introduced in Acme-MetaSyntactic version 0.33, published on August 1, 2005.
142  
143 I got the idea for this list on IRC, on the day it was published.
144  
145 =back
146  
147 =head1 SEE ALSO
148  
149 L<Acme::MetaSyntactic>, L<Acme::MetaSyntactic::List>.
150  
151 =cut
152  
153 __DATA__
« blib/lib/Acme/MetaSyntactic/pm_groups.pm ↑ Summary blib/lib/Acme/MetaSyntactic/tld.pm »