Skip to content

Commit

Permalink
add URI::nntps (closes #82)
Browse files Browse the repository at this point in the history
  • Loading branch information
karenetheridge committed Feb 26, 2021
1 parent 6b80838 commit 09f979e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 4 additions & 0 deletions lib/URI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions lib/URI/nntps.pm
Original file line number Diff line number Diff line change
@@ -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;
8 changes: 7 additions & 1 deletion t/news.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use strict;
use warnings;

print "1..7\n";
print "1..8\n";

use URI ();

Expand Down Expand Up @@ -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";

0 comments on commit 09f979e

Please sign in to comment.