diff options
author | Karen Etheridge <ether@cpan.org> | 2021-02-26 14:46:36 -0800 |
---|---|---|
committer | Karen Etheridge <ether@cpan.org> | 2021-02-26 15:39:51 -0800 |
commit | 09f979eabbe7da787297c34b4336aeb8c6a34c2f (patch) | |
tree | bc1860bcf14c11512f3572e34a3e567c0a671712 | |
parent | 6b80838c7a511ddb31618030782cecadc998c8e7 (diff) | |
download | uri-09f979eabbe7da787297c34b4336aeb8c6a34c2f.tar.gz |
add URI::nntps (closes #82)
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | lib/URI.pm | 4 | ||||
-rw-r--r-- | lib/URI/nntps.pm | 14 | ||||
-rw-r--r-- | t/news.t | 8 |
4 files changed, 26 insertions, 1 deletions
@@ -1,6 +1,7 @@ Revision history for URI {{$NEXT}} + - added URI::nntps (GH#82) 5.07 2021-01-29 22:52:20Z - s/perl.com/example.com/ in examples and tests (GH#81) (Olaf Alders) @@ -926,6 +926,10 @@ access the path: $uri->group and $uri->message. See I<news> scheme. +=item B<nntps>: + +See I<news> scheme. + =item B<pop>: The I<pop> URI scheme is specified in RFC 2384. The scheme is used to diff --git a/lib/URI/nntps.pm b/lib/URI/nntps.pm new file mode 100644 index 0000000..bf7d9c8 --- /dev/null +++ b/lib/URI/nntps.pm @@ -0,0 +1,14 @@ +package URI::nntps; + +use strict; +use warnings; + +our $VERSION = '5.08'; + +use parent 'URI::nntp'; + +sub default_port { 563 } + +sub secure { 1 } + +1; @@ -1,7 +1,7 @@ use strict; use warnings; -print "1..7\n"; +print "1..8\n"; use URI (); @@ -49,3 +49,9 @@ print "not " unless $u->group eq "no.perl" && $u->port == 563; print "ok 7\n"; +$u = URI->new("nntps://nntps.online.no/no.perl"); + +print "not " unless $u->group eq "no.perl" && + $u->host eq "nntps.online.no" && + $u->port == 563; +print "ok 8\n"; |