From fd9efab7d394b0bb40f6b9f000513fc720a888d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 8 May 2021 14:56:52 +0200 Subject: p5p: Add timeout, remove

--- run/p5p | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/run/p5p b/run/p5p index e343723..364af9c 100755 --- a/run/p5p +++ b/run/p5p @@ -5,7 +5,7 @@ use warnings; use Net::NNTP; use HTML::Entities; -my $nntp = Net::NNTP->new('nntp.perl.org') or die "Cannot contact nntp.perl.org: $!"; +my $nntp = Net::NNTP->new('nntp.perl.org', Timeout => 10) or die "Cannot contact nntp.perl.org: $!"; my ($count, $first, $last) = $nntp->group('perl.perl5.porters'); my %d = %{$nntp->xhdr('Date', [$last-10, $last])}; @@ -19,7 +19,6 @@ for ((reverse sort keys %d)[0..4]) { $f{$_} =~ s,@[^.]*\.,@hidden.,; my $l = "https://www.nntp.perl.org/group/perl.perl5.porters/0/0/msg$_.html"; print <

Date: $d{$_}
From: $f{$_}
-- cgit v1.2.3