ManUtils: Move, use ExtUtils::MakeMaker and get rid of AnyEvent
I mean, I like AnyEvent, but this can be done with core modules as well (albeit somewhat more verbose and error-prone...)
This commit is contained in:
parent
2f33e7f4b5
commit
682321d1be
9 changed files with 92 additions and 106 deletions
10
www/index.pl
10
www/index.pl
|
|
@ -13,11 +13,7 @@ use Cwd 'abs_path';
|
|||
our $ROOT;
|
||||
BEGIN { ($ROOT = abs_path $0) =~ s{/www/index\.pl$}{}; }
|
||||
|
||||
# Force the pure-perl AnyEvent backend; More lightweight and we don't need the
|
||||
# performance of EV.
|
||||
BEGIN { $ENV{PERL_ANYEVENT_MODEL} = 'Perl'; }
|
||||
|
||||
use lib "$ROOT/lib/ManUtils/inst/lib/perl5";
|
||||
use lib "$ROOT/ManUtils/blib/lib", "$ROOT/ManUtils/blib/arch";
|
||||
use ManUtils;
|
||||
|
||||
|
||||
|
|
@ -740,7 +736,7 @@ sub man_page($man, $url) {
|
|||
fu->done;
|
||||
}
|
||||
|
||||
my $fmt = ManUtils::html ManUtils::fmt_block soelim $man->{verid}, $content;
|
||||
my $fmt = ManUtils::html ManUtils::fmt soelim $man->{verid}, $content;
|
||||
if($url->{fmt} eq 'txt') {
|
||||
# TODO: The 'txt' format is kind of broken right now as it includes our HTML formatting codes.
|
||||
# This feature is a WIP and not advertised at the moment, anyway.
|
||||
|
|
@ -981,7 +977,7 @@ FU::get qr{/pkg/([^/]+)/(.+)} => sub($short, $path) {
|
|||
FU::get qr{/browse/(.+)} => sub($pkg) { fu->redirect(perm => "/pkg/$pkg") };
|
||||
|
||||
# Redirect for the system selection box, for visitors who have disabled JS.
|
||||
FU::get qr{/sysredir/([^/]+)} => sub($path) { fu->redirect(temp => '/man/'.(fu->query('system')//'arch')."/$path", 'temp') };
|
||||
FU::get qr{/sysredir/([^/]+)} => sub($path) { fu->redirect(temp => '/man/'.(fu->query('system')//'arch')."/$path") };
|
||||
|
||||
# Redirect for a specific language for a man page. I have no idea if anyone
|
||||
# still uses this URL format, but it was supported at some point, so let's keep
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue