AAAA-Crypt-DH
view release on metacpan or search on metacpan
inc/Module/Install/ReadmeFromPod.pm view on Meta::CPAN
require Pod::Html;
my ($o) = capture {
Pod::Html::pod2html(
"--infile=$in_file",
"--outfile=-",
@$options,
);
};
io->file($out_file)->print($o);
# Remove temporary files if needed
for my $file ('pod2htmd.tmp', 'pod2htmi.tmp') {
if (-e $file) {
unlink $file or warn "Warning: Could not remove file '$file'.\n$!\n";
}
}
return $out_file;
}
sub _readme_man {
my ($self, $in_file, $out_file, $options) = @_;
$out_file ||= 'README.1';
require Pod::Man;
my $parser = Pod::Man->new( @$options );
my $io = io->file($out_file)->open(">");
my $out_fh = $io->io_handle;
$parser->output_fh( *$out_fh );
$parser->parse_file( $in_file );
return $out_file;
}
sub _readme_pdf {
my ($self, $in_file, $out_file, $options) = @_;
$out_file ||= 'README.pdf';
eval { require App::pod2pdf; }
or die "Could not generate $out_file because pod2pdf could not be found\n";
my $parser = App::pod2pdf->new( @$options );
$parser->parse_from_file($in_file);
my ($o) = capture { $parser->output };
io->file($out_file)->print($o);
return $out_file;
}
sub _readme_md {
my ($self, $in_file, $out_file, $options) = @_;
$out_file ||= 'README.md';
require Pod::Markdown;
my $parser = Pod::Markdown->new( @$options );
my $io = io->file($out_file)->open(">");
my $out_fh = $io->io_handle;
$parser->output_fh( *$out_fh );
$parser->parse_file( $in_file );
return $out_file;
}
sub _all_from {
my $self = shift;
return unless $self->admin->{extensions};
my ($metadata) = grep {
ref($_) eq 'Module::Install::Metadata';
} @{$self->admin->{extensions}};
return unless $metadata;
return $metadata->{values}{all_from} || '';
}
'Readme!';
__END__
#line 316
( run in 0.782 second using v1.01-cache-2.11-cpan-39bf76dae61 )