Apache-Pod

 view release on metacpan or  search on metacpan

lib/Apache/Pod/HTML.pm  view on Meta::CPAN

        $r->print( _css() );
        return OK;
    }

    my $body;
    my $file = Apache::Pod::getpodfile( $r );

    if ( $file ) {
        my $parser = Pod::Simple::HTML->new;
        $parser->no_errata_section(1);
        $parser->complain_stderr(1);
        $parser->output_string( \$body );
        $parser->index( $r->dir_config('INDEX') );
        if ( my $prefix = $r->dir_config('LINKBASE') ) {
            if ( $prefix eq 'LOCAL' ) {
                $prefix = $r->location . '/';
            }
            $parser->perldoc_url_prefix( $prefix );
        }
        $parser->parse_file( $file );
        # TODO: Send the timestamp of the file in the header

lib/Apache/Pod/Text.pm  view on Meta::CPAN

use Apache::Constants;
use Pod::Simple::Text;

sub handler {
    my $r = shift;

    my $str;
    my $file = Apache::Pod::getpod( $r );

    my $parser = Pod::Simple::Text->new;
    $parser->complain_stderr(1);
    $parser->output_string( \$str );
    $parser->parse_file( $file );

    $r->content_type('text/plain');
    $r->send_http_header;
    $r->print( $str );

    return OK;
}



( run in 0.327 second using v1.01-cache-2.11-cpan-26ccb49234f )