Froody
view release on metacpan or search on metacpan
lib/Froody/DocServer.pm view on Meta::CPAN
use Froody::Dispatch;
my @methods = grep { $_->full_name !~ /^froody\./ }
Froody::Dispatch->new->repository->get_methods;
}
=item html()
returns the HTML version fo the docs, suitable for sending to the user
=cut
my $tt = Template->new();
sub html {
my $class = shift;
my @methods = $class->get_methods;
my $output;
$tt->process( \$template, { methods => \@methods }, \$output ) or die $tt->error;
return $output;
}
sub handler : method {
my ($class, $r) = @_;
$r->send_http_header("text/html; encoding=utf-8");
$r->print( Encode::encode_utf8($class->html) );
return OK();
}
=back
=head1 BUGS
None known.
Please report any bugs you find via the CPAN RT system.
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody>
=head1 AUTHOR
Copyright Fotango 2005. All rights reserved.
Please see the main L<Froody> documentation for details of who has worked
on this project.
This module is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
=head1 SEE ALSO
L<Froody>, L<Froody::Request>
=cut
1;
__DATA__
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- this document is auto-generated. Do not edit. -->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Froody Server Documentation</title>
<style>
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
background-color: #FFFFFF;
margin: 10px;
padding: 0;
}
p, td, th, div, li {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
line-height: normal;
text-decoration: none;
color: #000000;
margin: 0;
padding: 0;
}
p, pre, ul {
margin-left: 20px;
margin-bottom: 10px;
}
h1, h2, h3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
line-height: normal;
font-weight: bold;
}
h1 {
color: #ED252A;
}
h2 {
border-top: 1px solid black;
color: #000000;
}
h3 {
border-top: 1px dashed black;
color: #ED252A;
}
a {
text-decoration: none;
font-weight: bold;
color: #666666; }
a:hover {
text-decoration: underline;
font-weight: bold;
color: #ED252A; }
table {
border: 1px solid black;
}
td,th {
( run in 0.936 second using v1.01-cache-2.11-cpan-524268b4103 )