rjbs / Pod-Weaver

recombine pod documents into awesomer pod documents
26 stars 28 forks source link

Version's %m handles PODNAME; value-from-comment code in own role #16

Closed rsrchboy closed 10 years ago

rsrchboy commented 11 years ago

This changeset allows the Version section to handle %m when only a PODNAME is available, as in scripts. This both causes it to behave as the Name section does in such a scenariao, but also to be used with scripts w/o having to do any extraordinary effort to make it work.

The "get a string from a comment" code is also refactored out into its own helper role so as to be able to share it between the Name and Version plugins, as well as make it available for any interested third-party packages.

Rationale

I suppose I should update this to include a "but, why?" section -- I was finding that I had to work around and help Pod::Weaver deal with scripts to do things in a manner it handles automatically for .pm and .pod files. This was kinda annoying :) I can break this out into it's own package, but given most of the functionality already exists inside Pod::Weaver and just needed rearranging it seemed to make sense to include it here :)

karenetheridge commented 11 years ago

this looks like a fairly uncontroversial change.

rsrchboy commented 11 years ago

FWIW, this builds cleanly when merged with #19 at https://travis-ci.org/RsrchBoy/pod-weaver/builds/9880618

rjbs commented 10 years ago

thanks, merged