Dist::Zilla::Plugin::RewriteVersion::Transitional - Ease the transition to [RewriteVersion] in your distribution
In your dist.ini:
fallback_version_provider = Git::NextVersion
This is a Dist::Zilla plugin that subclasses [RewriteVersion], to allow plugin bundles to transition from [PkgVersion] or [OurPkgVersion] to [RewriteVersion] and [BumpVersionAfterRelease] without having to manually edit the dist.ini or any .pm files.
As with [RewriteVersion], the version can be overridden with the V environment variable, or provided through some other means by setting skip_version_provider = 1. Then, the main module (see "main module" in Dist::Zilla) in the distribution is checked for a $VERSION assignment. If one is not found, then the plugin named by the fallback_version_provider is instantiated (with any extra configuration options provided) and called to determine the version.
skip_version_provider = 1
When used in a distribution where the .pm file(s) does not contain a $VERSION declaration, this plugin will add one. If one is already present, it leaves it alone, acting just as [RewriteVersion] would.
You would then use [BumpVersionAfterRelease::Transitional] to increment the $VERSION in the .pm files in the repository.
Note: If there is more than one package in a single file, if there was any $VERSION declaration in the file, no additional declarations are added for the other packages, even if you are using the global option.
Configuration is the same as in [RewriteVersion], with the addition of:
Specify the name (in abbreviated form) of the plugin to use as a version provider if the version was not already set with the V environment variable. Not used if "skip_version_provider" in Dist::Zilla::Plugin::RewriteVersion is true.
Don't forget to add this plugin as a runtime-requires prerequisite in your plugin bundle!
Bugs may be submitted through the RT bug tracker (or bug-Dist-Zilla-Plugin-RewriteVersion-Transitional@rt.cpan.org).
There is also a mailing list available for users of this distribution, at http://dzil.org/#mailing-list.
There is also an irc channel available for users of this distribution, at #distzilla on irc.perl.org.
I am also usually active on irc, as 'ether' at irc.perl.org.
Karen Etheridge <firstname.lastname@example.org>
This software is copyright (c) 2014 by Karen Etheridge.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dist::Zilla::Plugin::RewriteVersion::Transitional, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.