Common/URI/news.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Common/URI/http.pm ↑ Summary Common/URI/pop.pm »
1 package Regexp::Common::URI::news;
2  
3 71 ▶use Regexp::Common qw /pattern clean no_defaults/;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 71 ▶use Regexp::Common::URI qw /register_uri/;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 71 ▶use Regexp::Common::URI::RFC1738 qw /$grouppart $group $article
Subroutine BEGIN: called CC=1 SCAR=0.0
6 71 $host $port $digits/;
7  
8 71 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 71 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 71 our $VERSION = '2024080801';
12  
13  
14 71 my $news_scheme = 'news';
15 71 my $news_uri = "(?k:(?k:$news_scheme):(?k:$grouppart))";
16  
17 71 my $nntp_scheme = 'nntp';
18 71 my $nntp_uri = "(?k:(?k:$nntp_scheme)://(?k:(?k:(?k:$host)(?::(?k:$port))?)"
19 . "/(?k:$group)(?:/(?k:$digits))?))";
20  
21 71 register_uri $news_scheme => $news_uri;
22 71 register_uri $nntp_scheme => $nntp_uri;
23  
24 71 pattern name => [qw (URI news)],
25 create => $news_uri,
26 ;
27  
28 71 pattern name => [qw (URI NNTP)],
29 create => $nntp_uri,
30 ;
31  
32 71 1;
33  
34 __END__
« Common/URI/http.pm ↑ Summary Common/URI/pop.pm »