Acme-Pi
view release on metacpan or search on metacpan
},
{
"class" : "Dist::Zilla::Plugin::MetaTests",
"name" : "@Author::ETHER/MetaTests",
"version" : "6.032"
},
{
"class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
"config" : {
"Dist::Zilla::Plugin::Test::CPAN::Changes" : {
"changelog" : "Changes",
"filename" : "xt/release/cpan-changes.t"
}
},
"name" : "@Author::ETHER/Test::CPAN::Changes",
"version" : "0.013"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
"name" : "@Author::ETHER/Test::ChangesHasContent",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"config" : {
"Dist::Zilla::Plugin::Git::Check" : {
"untracked_files" : "die"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.47.1",
"repo_root" : "."
}
},
"name" : "@Author::ETHER/initial check",
"version" : "2.051"
},
{
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"config" : {
"Dist::Zilla::Plugin::Git::Check" : {
"untracked_files" : "die"
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.47.1",
"repo_root" : "."
}
},
"name" : "@Author::ETHER/after tests",
"version" : "2.051"
},
{
},
"Dist::Zilla::Role::Git::DirtyFiles" : {
"allow_dirty" : [
"CONTRIBUTING",
"Changes",
"INSTALL",
"LICENCE",
"README.pod"
],
"allow_dirty_match" : [],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.47.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::ETHER/@Git::VersionManager/release snapshot",
"version" : "2.051"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"config" : {
"Dist::Zilla::Plugin::Git::Tag" : {
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
"tag" : "v3.14159265",
"tag_format" : "v%V",
"tag_message" : "v%v%t"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.47.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"allow_dirty" : [
"Build.PL",
"Changes",
"Makefile.PL",
"dist.ini",
"dist.ini"
],
"allow_dirty_match" : [
"(?^:^lib/.*\\.pm$)"
],
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.47.1",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
"time_zone" : "local"
}
},
"name" : "@Author::ETHER/@Git::VersionManager/post-release commit",
name: '@Author::ETHER/Test::EOL'
version: '0.19'
-
class: Dist::Zilla::Plugin::MetaTests
name: '@Author::ETHER/MetaTests'
version: '6.032'
-
class: Dist::Zilla::Plugin::Test::CPAN::Changes
config:
Dist::Zilla::Plugin::Test::CPAN::Changes:
changelog: Changes
filename: xt/release/cpan-changes.t
name: '@Author::ETHER/Test::CPAN::Changes'
version: '0.013'
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: '@Author::ETHER/Test::ChangesHasContent'
version: '0.011'
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Author::ETHER/PodSyntaxTests'
name: '@Author::ETHER/stale modules, release'
version: '0.060'
-
class: Dist::Zilla::Plugin::Git::Check
config:
Dist::Zilla::Plugin::Git::Check:
untracked_files: die
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty: []
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.47.1
repo_root: .
name: '@Author::ETHER/initial check'
version: '2.051'
-
class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts
config:
Dist::Zilla::Role::Git::Repo:
git_version: 2.47.1
name: '@Author::ETHER/TestRelease'
version: '6.032'
-
class: Dist::Zilla::Plugin::Git::Check
config:
Dist::Zilla::Plugin::Git::Check:
untracked_files: die
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty: []
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.47.1
repo_root: .
name: '@Author::ETHER/after tests'
version: '2.051'
-
class: Dist::Zilla::Plugin::CheckIssues
name: '@Author::ETHER/CheckIssues'
version: '0.011'
-
commit_msg: '%N-%v%t%n%n%c'
signoff: 0
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- CONTRIBUTING
- Changes
- INSTALL
- LICENCE
- README.pod
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.47.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::ETHER/@Git::VersionManager/release snapshot'
version: '2.051'
-
class: Dist::Zilla::Plugin::Git::Tag
config:
Dist::Zilla::Plugin::Git::Tag:
branch: ~
changelog: Changes
signed: 0
tag: v3.14159265
tag_format: v%V
tag_message: v%v%t
Dist::Zilla::Role::Git::Repo:
git_version: 2.47.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::ETHER/@Git::VersionManager/Git::Tag'
signoff: 0
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Build.PL
- Changes
- Makefile.PL
- dist.ini
- dist.ini
allow_dirty_match:
- (?^:^lib/.*\.pm$)
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.47.1
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
name: '@Author::ETHER/@Git::VersionManager/post-release commit'
version: '2.051'
-
class: Dist::Zilla::Plugin::Prereqs
config:
inc/MyCheckVersionIncremented.pm view on Meta::CPAN
with 'Dist::Zilla::Role::BeforeRelease';
sub before_release
{
my $self = shift;
my $dist_version = $self->zilla->version;
my $last_dist_version = $self->_indexed_distversion_via_query('Acme::Pi');
my $fatal = $last_dist_version ge $dist_version;
$self->${ $fatal ? \'log_fatal' : \'log' }([ 'We are releasing %s version %s. The last distribution version was %s.', $self->zilla->name, $dist_version, $last_dist_version ]);
}
use HTTP::Tiny;
use HTTP::Headers;
use Encode ();
use YAML::Tiny;
use CPAN::DistnameInfo;
# copied from [PromptIfStale] - TODO use CPAN::Common::Index instead.
sub _indexed_distversion_via_query
{
my ($self, $module) = @_;
my $url = 'http://cpanmetadb.plackperl.org/v1.0/package/' . $module;
$self->log_debug([ 'fetching %s', $url ]);
my $res = HTTP::Tiny->new->get($url);
$self->log('could not query the index?'), return undef if not $res->{success};
my $data = $res->{content};
if (my $charset = HTTP::Headers->new(%{ $res->{headers} })->content_type_charset)
{
$data = Encode::decode($charset, $data, Encode::FB_CROAK);
}
$self->log_debug([ 'got response: %s', $data ]);
my $payload = YAML::Tiny->read_string($data);
$self->log('invalid payload returned?'), return undef unless $payload;
$self->log_debug([ '%s not indexed', $module ]), return undef if not defined $payload->[0]{version};
return CPAN::DistnameInfo->new($payload->[0]{distfile})->version;
}
1;
lib/Acme/Pi.pm view on Meta::CPAN
use Acme::Pi;
my $area = $Ï * $radius**2;
my $volume = 4 * Ï / 3 * $radius**3;
=head1 DESCRIPTION
=for Pod::Coverage ð¿ Ï
This distribution was created to celebrate L<Pi Day|http://www.piday.org/> 2014,
as well as to demonstrate yet another example of a pathological C<$VERSION>.
Additionally, it exports two variables: C<$Ï> and C<$ð¿>,
and two constants, C<Ï> and C<ð¿>, defined as:
atan2(1,1) * 4;
This module also defines its own C<$VERSION> as a fixed-point value approximating
Ï (using as many digits as is supported on the local machine).
It is intended that version parsers in the toolchain (L<Module::Metadata>,
L<ExtUtils::MakeMaker>'s C<< MM->parse_version >>, L<Parse::PMFile>) should
xt/release/changes_has_content.t view on Meta::CPAN
ok(_get_changes($newver), "$changes_file has content for $newver");
}
done_testing;
sub _get_changes
{
my $newver = shift;
# parse changelog to find commit message
open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!";
my $changelog = join('', <$fh>);
if ($encoding) {
require Encode;
$changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK());
}
close $fh;
my @content =
grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented
split /\n/, $changelog;
shift @content; # drop the version line
# drop unindented last line and trailing blank lines
pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ );
# return number of non-blank lines
return scalar @content;
}
( run in 1.018 second using v1.01-cache-2.11-cpan-b61123c0432 )