On Sun Dec 19 15:47:55 2010, ROBINS wrote:
Show quoted text> On Wed Dec 08 01:32:15 2010, RTHOMPSON wrote:
> > On Tue Jun 15 05:22:41 2010, ROBINS wrote:
> > > The README.mkdn is not identical (in content/sections) to the README
> > > produced by ReadmeFromPod. You can see an example of the differences
> > > between the two files generated from the same source here:
> > >
> > >
http://github.com/robinsmidsrod/XML-
> > > Rabbit/commit/754879605abb456a5772d33e467f3b324b8a496a
> > >
> >
> > I have uploaded a testing release that should fix this problem You can
> > find it here:
> >
http://search.cpan.org/~rthompson/Dist-Zilla-Plugin-
> > ReadmeMarkdownFromPod-0.103410-TRIAL/
> >
> > Please test it out.
>
> I've tried using the new ReadmeMarkdownFromPod 0.103510 (which is newer
> than 0.103410), but it still generates and incomplete README.mkdn
> (compared to the one ReadmeFromPod creates). I've also updated all of my
> Dist::Zilla-related modules before trying things out.
>
> I'm unsure if this is related to the ordering in my dist.ini or if the
> bug is still present. Regardless, I'm still getting an incomplete
> README.mkdn.
>
> This is the dist.ini I'm trying it on:
>
https://github.com/robinsmidsrod/XML-Rabbit/blob/master/dist.ini
>
> PS: Sorry about the late response.
I figured out what the problem is. My dist.ini contains these lines (in
order):
[@Filter]
-bundle = @Basic
-remove = Readme
[PodWeaver]
[ReadmeFromPod]
[ReadmeMarkdownFromPod]
[CopyReadmeFromBuild]
The CopyReadmeFromBuild plugin contains this code, which obviously only
copies the first file it finds, not each of them. I don't know if this
should be considered a bug or a feature.
sub after_build {
my $self = shift;
my $data = shift;
my $build_root = $data->{build_root};
my $src;
for(qw/ README README.md README.mkdn README.txt README.markdown /) {
my $file = $build_root->file( $_ );
$src = $file and last if -e $file;
}
die "Missing README file in ", $build_root unless $src;
my $dest = $self->zilla->root->file( $src->basename );
copy "$src", "$dest" or die "Unable to copy $src to $dest: $!";
}
Wouldn't it be smarter to just do a glob for README* and copy all the
files found? I don't really see a problem with README files in multiple
formats.