Skip Menu |

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

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

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

Bug Information
Severity: Wishlist
Broken in: 0.141120
Fixed in: 0.142470



Subject: Add support for POD in .pod
The distribution author may prefer to split his main module in a .pm (for the pure Perl code) and a .pod (for the pure POD content) for various reasons: - - different encoding ReadmeAnyFromPod doesn't currently support this configuration and fails if no POD content is found in the main .pm -- Olivier Mengué - http://perlresume.org/DOLMEN
On Tue Jun 24 13:45:07 2014, DOLMEN wrote: Show quoted text
> > The distribution author may prefer to split his main module in a .pm > (for the pure Perl code) and a .pod (for the pure POD content) for > various reasons: > - > - different encoding > > ReadmeAnyFromPod doesn't currently support this configuration and > fails if no POD content is found in the main .pm
Hi, ReadmeAnyFromPod supports a "source_filname" option that lets you pull the POD from an arbitrary file. Does this work for your use case? Example: https://github.com/DarwinAwardWinner/Dist-Zilla-Plugin-ReadmeAnyFromPod/blob/master/t/otherpath.t
Le 2014-06-24 22:34:08, RTHOMPSON a écrit : Show quoted text
> > ReadmeAnyFromPod supports a "source_filname" option that lets you pull > the POD from an arbitrary file. Does this work for your use case? > > Example: https://github.com/DarwinAwardWinner/Dist-Zilla-Plugin- > ReadmeAnyFromPod/blob/master/t/otherpath.t
Thanks. I should be able to use with Dist::Milla: [@Milla] ReadmeAnyFromPod.source_filename = lib/My/Module.pod (Now, I am blocked by LicenseFromModule that doesn't have your workaround). -- Olivier Mengué - http://perlresume.org/DOLMEN
On Tue Jun 24 20:13:39 2014, DOLMEN wrote: Show quoted text
> Le 2014-06-24 22:34:08, RTHOMPSON a écrit :
> > > > ReadmeAnyFromPod supports a "source_filname" option that lets you pull > > the POD from an arbitrary file. Does this work for your use case? > > > > Example: https://github.com/DarwinAwardWinner/Dist-Zilla-Plugin- > > ReadmeAnyFromPod/blob/master/t/otherpath.t
> > Thanks. > I should be able to use with Dist::Milla: > > [@Milla] > ReadmeAnyFromPod.source_filename = lib/My/Module.pod > > (Now, I am blocked by LicenseFromModule that doesn't have your workaround).
Do you think it would make sense to prioritize a main module POD file over the pm file? I.e. if the main module is "lib/My/Module.pm" and "lib/My/Module.pod" also exists, do you think it would be a reasonable default to use the pod file as the source for the readme?
Le 2014-06-25 09:07:49, RTHOMPSON a écrit : Show quoted text
> Do you think it would make sense to prioritize a main module POD file > over the pm file? I.e. if the main module is "lib/My/Module.pm" and > "lib/My/Module.pod" also exists, do you think it would be a reasonable > default to use the pod file as the source for the readme?
Yes. The same logic as in LicenseFromModule is DWIM: - if source_file is specified, use it - else look for POD in order in lib/My/Module.pm, then lib/MyModule.pm By the way, I think this logic would benefit to others if it was exposed as a role. -- Olivier Mengué - http://perlresume.org/DOLMEN
On Sun Aug 24 04:22:41 2014, DOLMEN wrote: Show quoted text
> Le 2014-06-25 09:07:49, RTHOMPSON a écrit : >
> > Do you think it would make sense to prioritize a main module POD file > > over the pm file? I.e. if the main module is "lib/My/Module.pm" and > > "lib/My/Module.pod" also exists, do you think it would be a > > reasonable > > default to use the pod file as the source for the readme?
> > Yes. The same logic as in LicenseFromModule is DWIM: > - if source_file is specified, use it > - else look for POD in order in lib/My/Module.pm, then > lib/MyModule.pm > > By the way, I think this logic would benefit to others if it was > exposed as a role.
Yeah, I think that's a good idea. What would be a good name? Dist::Zilla::Role::MainPodReader?
On Sun Aug 24 10:52:56 2014, RTHOMPSON wrote: Show quoted text
> On Sun Aug 24 04:22:41 2014, DOLMEN wrote:
> > Le 2014-06-25 09:07:49, RTHOMPSON a écrit : > >
> > > Do you think it would make sense to prioritize a main module POD > > > file > > > over the pm file? I.e. if the main module is "lib/My/Module.pm" and > > > "lib/My/Module.pod" also exists, do you think it would be a > > > reasonable > > > default to use the pod file as the source for the readme?
> > > > Yes. The same logic as in LicenseFromModule is DWIM: > > - if source_file is specified, use it > > - else look for POD in order in lib/My/Module.pm, then > > lib/MyModule.pm > > > > By the way, I think this logic would benefit to others if it was > > exposed as a role.
> > Yeah, I think that's a good idea. What would be a good name? > Dist::Zilla::Role::MainPodReader?
I've extracted the relevant code here: https://github.com/DarwinAwardWinner/Dist-Zilla-Role-MainPodReader There's no tests yet. I think I'll test it by rewriting ReadmeAnyFromPod to use it.
On Sun Aug 24 22:04:38 2014, RTHOMPSON wrote: Show quoted text
> On Sun Aug 24 10:52:56 2014, RTHOMPSON wrote:
> > On Sun Aug 24 04:22:41 2014, DOLMEN wrote:
> > > Le 2014-06-25 09:07:49, RTHOMPSON a écrit : > > >
> > > > Do you think it would make sense to prioritize a main module POD > > > > file > > > > over the pm file? I.e. if the main module is "lib/My/Module.pm" > > > > and > > > > "lib/My/Module.pod" also exists, do you think it would be a > > > > reasonable > > > > default to use the pod file as the source for the readme?
> > > > > > Yes. The same logic as in LicenseFromModule is DWIM: > > > - if source_file is specified, use it > > > - else look for POD in order in lib/My/Module.pm, then > > > lib/MyModule.pm > > > > > > By the way, I think this logic would benefit to others if it was > > > exposed as a role.
> > > > Yeah, I think that's a good idea. What would be a good name? > > Dist::Zilla::Role::MainPodReader?
> > > I've extracted the relevant code here: > > https://github.com/DarwinAwardWinner/Dist-Zilla-Role-MainPodReader > > There's no tests yet. I think I'll test it by rewriting > ReadmeAnyFromPod to use it.
I changed my mind. Now it's here: https://github.com/DarwinAwardWinner/Dist-Zilla-Role-DistFileReader And I now have a dev branch of ReadmeAnyFromPod based on this that passes all tests!