File Coverage

blib/lib/Regexp/Common/URI/news.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Regexp::Common::URI::news;
2              
3 72     72   249 use Regexp::Common qw /pattern clean no_defaults/;
  72         77  
  72         304  
4 72     72   254 use Regexp::Common::URI qw /register_uri/;
  72         134  
  72         2562  
5 72         6058 use Regexp::Common::URI::RFC1738 qw /$grouppart $group $article
6 72     72   251 $host $port $digits/;
  72         72  
7              
8 72     72   382 use strict;
  72         89  
  72         1315  
9 72     72   211 use warnings;
  72         171  
  72         1677  
10              
11 72     72   358 use vars qw /$VERSION/;
  72         179  
  72         8605  
12             $VERSION = '2017040401';
13              
14              
15             my $news_scheme = 'news';
16             my $news_uri = "(?k:(?k:$news_scheme):(?k:$grouppart))";
17              
18             my $nntp_scheme = 'nntp';
19             my $nntp_uri = "(?k:(?k:$nntp_scheme)://(?k:(?k:(?k:$host)(?::(?k:$port))?)"
20             . "/(?k:$group)(?:/(?k:$digits))?))";
21              
22             register_uri $news_scheme => $news_uri;
23             register_uri $nntp_scheme => $nntp_uri;
24              
25             pattern name => [qw (URI news)],
26             create => $news_uri,
27             ;
28              
29             pattern name => [qw (URI NNTP)],
30             create => $nntp_uri,
31             ;
32              
33             1;
34              
35             __END__