Skip to content

Commit 09f979e

Browse files
add URI::nntps (closes #82)
1 parent 6b80838 commit 09f979e

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Revision history for URI
22

33
{{$NEXT}}
4+
- added URI::nntps (GH#82)
45

56
5.07 2021-01-29 22:52:20Z
67
- s/perl.com/example.com/ in examples and tests (GH#81) (Olaf Alders)

lib/URI.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,10 @@ access the path: $uri->group and $uri->message.
926926
927927
See I<news> scheme.
928928
929+
=item B<nntps>:
930+
931+
See I<news> scheme.
932+
929933
=item B<pop>:
930934
931935
The I<pop> URI scheme is specified in RFC 2384. The scheme is used to

lib/URI/nntps.pm

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package URI::nntps;
2+
3+
use strict;
4+
use warnings;
5+
6+
our $VERSION = '5.08';
7+
8+
use parent 'URI::nntp';
9+
10+
sub default_port { 563 }
11+
12+
sub secure { 1 }
13+
14+
1;

t/news.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use strict;
22
use warnings;
33

4-
print "1..7\n";
4+
print "1..8\n";
55

66
use URI ();
77

@@ -49,3 +49,9 @@ print "not " unless $u->group eq "no.perl" &&
4949
$u->port == 563;
5050
print "ok 7\n";
5151

52+
$u = URI->new("nntps://nntps.online.no/no.perl");
53+
54+
print "not " unless $u->group eq "no.perl" &&
55+
$u->host eq "nntps.online.no" &&
56+
$u->port == 563;
57+
print "ok 8\n";

0 commit comments

Comments
 (0)