Acme-Pi
view release on metacpan or search on metacpan
name = Acme-Pi
author = Karen Etheridge <ether@cpan.org>
copyright_holder = Karen Etheridge
copyright_year = 2014
license = Perl_5
:version = 6.012 ; version requirement for Dist::Zilla itself
version = 3.14159265 ; we will add one significant figure for every release
; edits dist.ini after release to bump this version ^^
[=inc::MyBumpVersionAfterRelease]
[@Author::ETHER]
:version = 0.097
Test::PodSpelling.stopwords = Mmm
Test::MinimumVersion.max_target_perl = 5.008 ; utf8
-remove = Test::Pod::No404s ; can't connect to piday.org? :(
-remove = MetaProvides::Package ; populating version = 3?!
-remove = RewriteVersion ; not using it, but make sure it never gets used
-remove = BumpVersionAfterRelease ; ""
inc/MyBumpVersionAfterRelease.pm view on Meta::CPAN
use Path::Tiny 0.061;
# this is a smarter version of:
# [Run::AfterRelease]
# run = %x -p -i -e's/^version = 3\.(\d+)\s/sprintf(q(version = %0.( . (length($1)+1) . q(g), atan2(1,1)*4)/x'
sub after_release
{
my $self = shift;
# edits dist.ini to add one decimal point to the version
my $Ï = atan2(1,1) * 4;
my $original_version = $self->zilla->version;
my $length = length($original_version);
# add another digit if we added a 0, as it will be numerically identical
do {} while substr($Ï, $length++, 1) eq '0';
my $new_version = substr($Ï, 0, $length);
# munge dist.ini to edit version line
my $path = path('dist.ini');
my $content = $path->slurp_utf8;
my $delta_length = $length - length($original_version);
if ($content =~ s/^(version = )$original_version\s{$delta_length}(\s+)/$1$new_version$2/m)
{
# append+truncate to preserve file mode
$path->append_utf8({ truncate => 1 }, $content);
return 1;
( run in 0.655 second using v1.01-cache-2.11-cpan-de7293f3b23 )