From 11eec3365d537b20ade6923eaa5fdd18206d4342 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 5 Jan 2020 23:23:31 +0000 Subject: hval: export prurl and add prototype This allows to do some compile-time checking and fills in a missing "use" in PublicInbox::NewsWWW, allowing it to be used standalone and independently of PublicInbox::WWW --- lib/PublicInbox/NewsWWW.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/NewsWWW.pm') diff --git a/lib/PublicInbox/NewsWWW.pm b/lib/PublicInbox/NewsWWW.pm index ee11a089..be1d43ef 100644 --- a/lib/PublicInbox/NewsWWW.pm +++ b/lib/PublicInbox/NewsWWW.pm @@ -10,6 +10,7 @@ use strict; use warnings; use PublicInbox::Config; use PublicInbox::MID qw(mid_escape); +use PublicInbox::Hval qw(prurl); sub new { my ($class, $pi_config) = @_; @@ -48,7 +49,7 @@ sub call { my ($ng, $article) = @parts; my $pi_config = $self->{pi_config}; if (my $ibx = $pi_config->lookup_newsgroup($ng)) { - my $url = PublicInbox::Hval::prurl($env, $ibx->{url}); + my $url = prurl($env, $ibx->{url}); my $code = 301; if (defined $article && $article =~ /\A[0-9]+\z/) { my $mid = eval { $ibx->mm->mid_for($article) }; -- cgit v1.2.3-24-ge0c7