aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-05-08 14:56:52 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-05-08 14:56:52 +0200
commitfd9efab7d394b0bb40f6b9f000513fc720a888d8 (patch)
tree52f82f1daf842569f46fc3dfb0a3aa5bff4f9d83
parent82eba6b5d1508a0e05a1231d4236b0187642abf1 (diff)
downloadperlisdead-fd9efab7d394b0bb40f6b9f000513fc720a888d8.tar.gz
p5p: Add timeout, remove <p>
-rwxr-xr-xrun/p5p3
1 files changed, 1 insertions, 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,@[^.]*\.,@<i>hidden</i>.,;
my $l = "https://www.nntp.perl.org/group/perl.perl5.porters/0/0/msg$_.html";
print <<HTML;
-<p>
<div class="entry">
<div class="date">Date: $d{$_}</div>
<div class="from">From: $f{$_}</div>