#!sdh use warnings; use strict; my $doc = SDH::Doc->new(); $SDH::res->body($doc); $SDH::handler->post(0); $doc->mime_type('application/xhtml+xml'); my $target = $SDH::req->{path}[0]; my $result = ''; my $file = '/tmp/pod.html'; if ($target) { $result = `perldoc -uT $target`; if ($result) { use Cwd qw(chdir getcwd); my $old_wd = getcwd(); chdir('/tmp'); open FILE, "> $file"; print FILE $result; close FILE; $doc->append(`pod2html --infile=$file`); chdir($old_wd); } else { return 'NOT_FOUND'; } } else { my $list = ''; for (sort qw[ SDH::DBTable SDH::DBRecord SDH::KeyedDBTable WR::Session UNIVERSAL ]) { $list .= "
  • $_
  • \n"; } $doc->append(<< "EOT"); POD? EOT } 'OK';