diff options
author | Eric Wong <e@yhbt.net> | 2020-01-05 23:23:31 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-06 10:20:37 +0000 |
commit | 11eec3365d537b20ade6923eaa5fdd18206d4342 (patch) | |
tree | 90e37108bb9b800555f08b32ac248eeabe140373 /lib/PublicInbox/NewsWWW.pm | |
parent | ac47f1bc4692ec11760017fff706e06a5fa8ebc7 (diff) | |
download | public-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.pm | 3 |
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) }; |