in reply to Re^2: Using a Single Point of Truth for $VERSION in a distribution?
in thread Using a Single Point of Truth for $VERSION in a distribution?
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:
to:package My::Module; # VERSION
with a dist.ini like:package My::Module; our $VERSION = '0.01'; # VERSION
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.... version = 0.01; [OurPkgVersion]
(... 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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using a Single Point of Truth for $VERSION in a distribution?
by jcb (Parson) on Apr 21, 2020 at 01:56 UTC | |
by choroba (Cardinal) on Apr 21, 2020 at 09:00 UTC | |
by jcb (Parson) on Apr 22, 2020 at 01:23 UTC |