Skip to content

Commit

Permalink
Use newer API for Pod::Markdown
Browse files Browse the repository at this point in the history
isa Pod::Simple now
we can do it the same way we do xhtml
  • Loading branch information
rwstauner committed Jan 16, 2015
1 parent 13c73d4 commit 27339da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/MetaCPAN/Server/View/Pod.pm
Expand Up @@ -3,7 +3,6 @@ package MetaCPAN::Server::View::Pod;
use strict;
use warnings;

use IO::String;
use MetaCPAN::Pod::XHTML;
use Moose;
use Pod::Markdown;
Expand Down Expand Up @@ -40,10 +39,12 @@ sub process {
}

sub build_pod_markdown {
my $self = shift;
my ( $self, $source ) = @_;
my $parser = Pod::Markdown->new;
$parser->parse_from_filehandle( IO::String->new(shift) );
return $parser->as_markdown;
my $mkdn = q[];
$parser->output_string( \$mkdn );
$parser->parse_string_document($source);
return $mkdn;
}

sub build_pod_html {
Expand Down

0 comments on commit 27339da

Please sign in to comment.