Skip to content

Commit

Permalink
drop support for perl 5.10
Browse files Browse the repository at this point in the history
  • Loading branch information
DrHyde committed Jan 8, 2023
1 parent 9f816f4 commit 9ebcb97
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: 'ubuntu-latest'
strategy:
matrix:
perl: [ '5.36', '5.30', '5.26', '5.22', '5.16', '5.10' ]
perl: [ '5.36', '5.30', '5.26', '5.22', '5.16', '5.12' ]
name: Perl ${{ matrix.perl }}
steps:
- name: check out code
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ X.XXXX XXXX-XX-XX
we now have an egregious hack to work around that. See
https://github.com/DrHyde/perl-modules-Number-Phone/issues/112

- No longer auto-tested on 5.10 because a 'make test'-time dependency (Test::Deep)
no longer supports that.

- Data updates

3.8007 2022-12-02
Expand Down
11 changes: 10 additions & 1 deletion lib/Number/Phone.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use Number::Phone::StubCountry;

use Devel::Deprecations::Environmental
Int32 => { unsupported_from => '2023-06-01' },
OldPerl => { unsupported_from => '2022-11-08', older_than => '5.10.0' };
OldPerl => { unsupported_from => '2022-11-08', older_than => '5.10.0' },
OldPerl => { unsupported_from => '2022-01-08', older_than => '5.12.0' };

# MUST be in format N.NNNN, see https://github.com/DrHyde/perl-modules-Number-Phone/issues/58
our $VERSION = '3.8007';
Expand Down Expand Up @@ -246,6 +247,14 @@ remove support without notice. However, because I can not automatically test, I
can't guarantee that I won't B<accidentally> remove support. If I do
accidentally remove it, it ain't coming back.
Similarly, Perl 5.10 is not fully supported as of the version after 3.8007, whatever
that may be. This is because there is a dependency on L<Test::Deep>, which
dropped support for that version of perl at the start of 2023. This means that
I can no longer automatically test on that version of perl, and you can't
(easily) install the necessary dependencies. Depending on details of what you
installed when, future releases of Number::Phone may or may not continue to
work for you.
=cut

sub _new_args {
Expand Down
17 changes: 11 additions & 6 deletions t/deprecations.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use warnings;

use Data::Dumper::Concise;
use Test::More;
use Test::Warnings qw(warning :no_end_test);
use Test::Warnings qw(warnings :no_end_test);

my $warnings = [ warning { use_ok 'Number::Phone' } ];
my $warnings = [ warnings { use_ok 'Number::Phone' } ];

if(~0 == 4294967295) {
ok(
Expand All @@ -20,13 +20,18 @@ if(~0 == 4294967295) {
}

if($] < 5.010) {
ok(
scalar(grep { /too old/ } @{$warnings}) == 1,
is(
scalar(grep { /too old/ } @{$warnings}), 2,
"warned about perl being too old (for both 5.10 and 5.12)"
)
} elsif($] < 5.012) {
is(
scalar(grep { /too old/ } @{$warnings}), 1,
"warned about perl being too old"
)
} else {
ok(
scalar(grep { /too old/ } @{$warnings}) == 0,
is(
scalar(grep { /too old/ } @{$warnings}), 0,
"no warnings about perl being too old"
)
}
Expand Down

0 comments on commit 9ebcb97

Please sign in to comment.