about summary refs log tree commit homepage
path: root/lib/PublicInbox/NewsWWW.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-01-05 23:23:31 +0000
committerEric Wong <e@yhbt.net>2020-01-06 10:20:37 +0000
commit11eec3365d537b20ade6923eaa5fdd18206d4342 (patch)
tree90e37108bb9b800555f08b32ac248eeabe140373 /lib/PublicInbox/NewsWWW.pm
parentac47f1bc4692ec11760017fff706e06a5fa8ebc7 (diff)
downloadpublic-inbox-11eec3365d537b20ade6923eaa5fdd18206d4342.tar.gz
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
Diffstat (limited to 'lib/PublicInbox/NewsWWW.pm')
-rw-r--r--lib/PublicInbox/NewsWWW.pm3
1 files changed, 2 insertions, 1 deletions
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) };