in reply to Re^3: 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? ;-)

Yes, for the one, specific, narrow function I need and without using Moose. In fact, I am planning to write a pair of shell scripts because I do not want to automate uploading to CPAN. One pre-release script and one post-release script. I have been burned by "Sorceror's Apprentice" mistakes too many times in the past.

without having to deal with typeglobs in your module sources

The typeglobs in the module sources are actually trivial to handle; in effect, they are simply a fancier way to write "# VERSION" that perl can also understand.

(will it return the source files to their "typeglob" state after rolling the tarball?)

Yes, using git reset — I already store the release tarball in the repository on a tagged branch, then reset the working tree so that continued development does not accumulate tags on master over time.

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.

I see it as less magic because it does less — I have no desire to autogenerate a boilerplate README or any of the other fancy options Dist::Zilla offers. The rest of that sentence is a classic bandwagon fallacy.

Replies are listed 'Best First'.
Re^5: Using a Single Point of Truth for $VERSION in a distribution?
by choroba (Cardinal) on Apr 21, 2020 at 09:00 UTC
    > git reset

    Do you really need to change the source code in the repository? Can't you run the change in the distribution directory only? (I don't know the answer).

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      I may as well modify the working tree — I have to do git reset anyway after making the tagged commit that includes the release tarball.