public-inbox.git  about / heads / tags
an "archives first" approach to mailing lists
blob 88c8d64121ca7a5d384c3772f3d12de2cfc6a4a8 546 bytes (raw)
$ git show HEAD:lib/PublicInbox/URInntps.pm	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 
# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>

# deal with the lack of URI::nntps in upstream URI.
# nntps is IANA registered, snews is deprecated
# cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983419
# Fixed in URI 5.08, we can drop this by 2035 when LTS distros all have it
package PublicInbox::URInntps;
use v5.12;
use parent qw(URI::snews);
use URI;

sub new {
	my ($class, $url) = @_;
	$url =~ m!\Anntps://!i ? bless(\$url, $class) : URI->new($url);
}

1;

git clone https://public-inbox.org/public-inbox.git
git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git