logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: [Module::Build] Nit on create_readme -- doesn't look for a .pod file: msg#00031

Subject: Re: [Module::Build] Nit on create_readme -- doesn't look for a .pod file
Done.

Want to write a test for it?

 -Ken

On Sep 23, 2005, at 11:35 AM, David Golden wrote:

do_create_readme only uses the .pm file, not a .pod file, if one exists.

Could we please modify it more along these lines? (Quick and dirty example)

sub do_create_readme {
  my $self = shift;
  $self->delete_filetree('README');
  my $parser = eval {require Pod::Readme; 1} ? Pod::Readme->new :
               eval {require Pod::Text;   1} ? Pod::Text->new :
           die "Can't load Pod::Readme or Pod::Text to create README";
  $self->log_info("Creating README using " . ref($parser) . "\n");
  my $pm_file = $self->dist_version_from;
  (my $pod_file = $pm_file) =~ s/.pm\z/.pod/;
  $parser->parse_from_file(
      (-e $pod_file ? $pod_file : $pm_file), 'README', @_
  );
  $self->_add_to_manifest('MANIFEST', 'README');
}

Thanks,
David



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php


<Prev in Thread] Current Thread [Next in Thread>