Use POD for the ncdc manual as well

This commit is contained in:
Yorhel 2012-01-18 13:37:57 +01:00
parent 72a63e80dd
commit d96a273672
2 changed files with 709 additions and 802 deletions

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@ TUWF::register(
qr{ncdc} => sub { podpage(shift, 'ncdc', 'ncdc', '', 'NCurses Direct Connect') },
qr{ncdc/faq} => sub { podpage(shift, 'ncdc-faq', 'ncdc', 'faq', 'Ncdc Q&A', 1) },
qr{ncdc/scr} => sub { podpage(shift, 'ncdc-scr', 'ncdc', 'scr', 'Ncdc Screenshots') },
qr{ncdc/man} => sub { manpage(shift, 'ncdc-man', 'ncdc', 'man', 'Ncdc Manual') },
qr{ncdc/man} => sub { podpage(shift, 'ncdc-man', 'ncdc', 'man', 'Ncdc Manual', 1) },
qr{ncdc/changes} => sub { changelog(shift, 'ncdc-changelog', 'ncdc', 'changes', 'Ncdc Changelog') },
qr{tuwf} => sub { podpage(shift, 'tuwf', 'tuwf', '', 'The Ultimate Website Framework') },
qr{tuwf/man(?:/(db|misc|request|response|xml))?} => \&tuwfmanual,
@ -50,19 +50,6 @@ sub podpage {
}
# TODO: Convert to POD, or use POD as original source for the man pages
sub manpage {
my($s, $f, $p, $se, $t) = @_;
$s->htmlHeader(title => $t, page => $p, sec => $se);
open my $F, '<:utf8', "$ROOT/dat/$f" or die $!;
pre;
txt $_ while(<$F>);
end;
close $F;
$s->htmlFooter;
}
sub changelog {
my($s, $f, $p, $se, $t) = @_;
$s->htmlHeader(title => $t, page => $p, sec => $se);