Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-ReadmeMarkdownFromPod CPAN distribution.

Report information
The Basics
Id: 58401
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-ReadmeMarkdownFromPod

People
Owner: Nobody in particular
Requestors: ROBINS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.100700
Fixed in: 0.103510



Subject: Generated README.mkdn is not complete
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
On Tue Jun 15 05:22:41 2010, ROBINS wrote: Show quoted text
> 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.
On Wed Dec 08 01:32:15 2010, RTHOMPSON wrote: Show quoted text
> 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.
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.
On Sun Dec 19 12:44:24 2010, ROBINS wrote: Show quoted text
> On Sun Dec 19 15:47:55 2010, ROBINS wrote:
> > 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.
You may wish to switch to my CopyFilesFromBuild plugin, which allows you to specify all the files you want copied (or moved) from the build to the dist root. http://search.cpan.org/~rthompson/Dist-Zilla-Plugin-CopyFilesFromBuild-0.103510/ Also, if you wish to generate multiple readme files in varied formats, you may want to look into my other plugin, ReadmeAnyFromPod. http://search.cpan.org/~rthompson/Dist-Zilla-Plugin-ReadmeAnyFromPod-0.103522/