So, in the end you decided to reimplement Dist::Zilla? ;-)

If you set up a dist.ini specifying only Dist::Zilla::Plugin::PkgVersion you would have the same thing, but without having to deal with typeglobs in your module sources.

Or, you could use Dist::Zilla::Plugin::OurPkgVersion which changes:

package My::Module; # VERSION
to:
package My::Module; our $VERSION = '0.01'; # VERSION
with a dist.ini like:
... version = 0.01; [OurPkgVersion]
That is the first versioning system I used when I began with Dist::Zilla. You have to manually set the version number in your dist.ini before you build. I now use the plugins I shared earlier in this thread, so once I start a project and specify the initial version, I never have to touch the version number myself again.

(... and of course dzil will also run the tests, build the Makefile and meta files, roll the tarball and push to CPAN ... and commit and push the changes to your Git repo, if you configure it to.)

Of course you could build a tool to do this (will it return the source files to their "typeglob" state after rolling the tarball?). But why would you? I don't see that there's any less magic in that approach than in using the framework that many of the leading CPAN authors trust with their contributions.

Hope this helps!


The way forward always starts with a minimal test.

In reply to Re^3: Using a Single Point of Truth for $VERSION in a distribution? by 1nickt
in thread Using a Single Point of Truth for $VERSION in a distribution? by jcb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.