Skip to content

Commit

Permalink
switch feature is deprecated, remove from 1 pm.
Browse files Browse the repository at this point in the history
  • Loading branch information
brainbuz committed Jul 30, 2024
1 parent 6d7dc64 commit aa7412c
Show file tree
Hide file tree
Showing 37 changed files with 74 additions and 79 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ jobs:
fail-fast: false
matrix:
perl:
- "5.40"
- "5.38"
- "5.36"
- "5.32"
# - "5.30"
- "5.28"
# - "5.26"
- "5.24"
# - "5.22"
# - "5.20"
# - '5.8' # dzil not available

steps:
- uses: actions/checkout@v3
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/prove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,21 @@ jobs:
fail-fast: false
matrix:
perl-version:
- "5.40"
- "5.38"
- "5.36"
- "5.34"
- "5.32"
- "5.30"
- "5.28"
- "5.26"
- "5.24"
# - "5.22"
# - "5.20"
# - '5.8' # dzil not available

container:
image: perldocker/perl-tester:${{ matrix.perl-version }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: uses install-with-cpm
uses: perl-actions/install-with-cpm@stable
Expand Down
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Revision history for Vote::Count
2.04 Aug 1, 2024 given/when deprecation.
2.03 Nov 11, 2022 remove ghost dependencies, review dependencies.
2.01 June 30, 2021 lc tiebreakmethod in tiebreaker, improvements to untielist.
added strict moose attribute checking.
Expand Down
2 changes: 1 addition & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ copyright_holder = John Karr
copyright_year = 2021
;release_status = stable

version = 2.03
version = 2.04

[MinimumPerl]
perl = 5.024
Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ use Vote::Count::Matrix;

no warnings 'experimental';

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count - a tool kit for preferential ballots
=head1 VERSION 2.02
=head1 VERSION 2.04
=head2 A Toolkit for Resolving Preferential Ballots.
Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Approval.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ use Moose::Role;
no warnings 'experimental';
use Carp;

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Approval
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Borda.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ package Vote::Count::Borda;

use Moose::Role;

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Borda
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/BottomRunOff.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ use Carp;
use Data::Dumper;
use Data::Printer;

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::BottomRunOff
=head1 VERSION 2.02
=head1 VERSION 2.04
=head2 Description
Expand Down
2 changes: 1 addition & 1 deletion lib/Vote/Count/Catalog.pod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

=pod

=head1 VERSION 2.02
=head1 VERSION 2.04

=head1 NAME

Expand Down
16 changes: 7 additions & 9 deletions lib/Vote/Count/Charge.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use strict;
use warnings;
use 5.024;
use feature qw /postderef signatures switch/;
use feature qw /postderef signatures/;

package Vote::Count::Charge;
use namespace::autoclean;
Expand All @@ -20,7 +20,7 @@ use Cpanel::JSON::XS;
use YAML::XS;
# use Storable 3.15 'dclone';

our $VERSION='2.02';
our $VERSION='2.04';

has 'Seats' => (
is => 'ro',
Expand Down Expand Up @@ -246,12 +246,10 @@ sub Reinstate ( $I, @choices ) {
my @reinstated = ();
REINSTATELOOP:
for my $choice (@choices) {
# I'm a fan of the give/when construct, but go to lengths not to use it
# because of past issues and that after 15 years it is still experimental.
given ($I->{'choice_status'}{$choice}{'state'}){
when ( 'suspended') { }
when ( 'deferred' ) { }
default { next REINSTATELOOP }
for my $state ($I->{'choice_status'}{$choice}{'state'}){
if ( $state eq 'suspended') { }
elsif ( $state eq 'deferred' ) { }
else { next REINSTATELOOP }
};
($I->{'suspended'}->@*) = grep ( !/^$choice$/, $I->{'suspended'}->@* );
($I->{'deferred'}->@*) = grep ( !/^$choice$/, $I->{'deferred'}->@* );
Expand Down Expand Up @@ -377,7 +375,7 @@ sub SetQuota ($I, $style='droop') {
Vote::Count::Charge
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Charge/Cascade.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ use Path::Tiny;
use Carp;
use Vote::Count::Helper::FullCascadeCharge;

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Charge::Cascade
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ use Path::Tiny;

# ABSTRACT: Role shared by Count and Matrix for common functionality. See Vote::Count Documentation.

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Common
=head1 VERSION 2.02
=head1 VERSION 2.04
=head1 Synopsis
Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Floor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ use Moose::Role;

no warnings 'experimental';

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Floor
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Helper/FullCascadeCharge.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ use feature qw /postderef signatures/;
use Sort::Hash;
use Vote::Count::TextTableTiny qw/generate_table/;

our $VERSION='2.02';
our $VERSION='2.04';

# ABSTRACT: Non OO Components for the Vote::Charge implementation of STV FullCascadeCharge.

=head1 NAME
Vote::Count::Helper::FullCascadeCharge
=head1 VERSION 2.02
=head1 VERSION 2.04
=head1 SYNOPSIS
Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Helper/NthApproval.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ no warnings 'experimental';
use feature qw /postderef signatures/;
# use Vote::Count::TextTableTiny qw/generate_table/;

our $VERSION='2.02';
our $VERSION='2.04';

# ABSTRACT: Nth Approval Defeat rule for STV elections.

=head1 NAME
Vote::Count::Helper::NthApproval
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Helper/Table.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ use feature qw /postderef signatures/;
use Sort::Hash;
use Vote::Count::TextTableTiny qw/generate_table/;

our $VERSION='2.02';
our $VERSION='2.04';

# ABSTRACT: Non OO Components for the Vote::Charge implementation of STV.

=head1 NAME
Vote::Count::Helper::Table
=head1 VERSION 2.02
=head1 VERSION 2.04
=head1 Description
Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Helper/TestBalance.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ use 5.024;

package Vote::Count::Helper::TestBalance;

our $VERSION='2.02';
our $VERSION='2.04';

# ABSTRACT: Custom Test for checking STV charge calculations.

=head1 NAME
Vote::Count::Helper::TestBalance;
=head1 VERSION 2.02
=head1 VERSION 2.04
=head1 Synopsis
Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/IRV.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ with 'Vote::Count::TieBreaker';

use Storable 3.15 'dclone';

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::IRV
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Log.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ use Moose::Role;
no warnings 'experimental';
use Path::Tiny 0.108;

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Log
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Matrix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ use Storable 3.15 'dclone';

use YAML::XS;

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Matrix
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Method/Cascade.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ use Try::Tiny;
use Path::Tiny;
use Carp;

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Method::Cascade
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Method/CondorcetDropping.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ use namespace::autoclean;
use Moose;
extends 'Vote::Count';

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Method::CondorcetDropping
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
4 changes: 2 additions & 2 deletions lib/Vote/Count/Method/CondorcetIRV.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ use Moose;
extends 'Vote::Count';
with 'Vote::Count::BottomRunOff';

our $VERSION='2.02';
our $VERSION='2.04';

=head1 NAME
Vote::Count::Method::CondorcetIRV
=head1 VERSION 2.02
=head1 VERSION 2.04
=cut

Expand Down
Loading

0 comments on commit aa7412c

Please sign in to comment.