Skip to content

Commit

Permalink
Merge pull request #1073 from ikedas/issue-1030 by ikedas
Browse files Browse the repository at this point in the history
Drop support for Perl prior to 5.16 (#1030)
  • Loading branch information
ikedas authored Jan 8, 2021
2 parents e1555fc + 6241a20 commit 387e42d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
7 changes: 0 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- coverage-install
- coverage-setup
- cpanm --quiet --notest --installdeps --with-develop --with-feature=Data::Password --with-feature=ldap --with-feature=safe-unicode --with-feature=smime --with-feature=soap --with-feature=sqlite .
- cpanm --notest --quiet Unicode::CaseFold
- autoreconf -i
- ./configure
- cd src; make; cd ..
Expand All @@ -17,12 +16,6 @@
- coverage-report
- make clean

"5.10":
<<: *job
"5.12":
<<: *job
"5.14":
<<: *job
"5.16":
<<: *job
variables:
Expand Down
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ perl:
- "5.20"
- "5.18"
- "5.16"
- "5.14"
- "5.12"
- "5.10"

matrix:
include:
Expand All @@ -29,7 +26,6 @@ before_install:
install:
- cpan-install --coverage
- cpanm --installdeps --notest --with-develop --with-feature=Data::Password --with-feature=ldap --with-feature=safe-unicode --with-feature=smime --with-feature=soap --with-feature=sqlite .
- cpanm --notest --quiet Unicode::CaseFold

before_script:
- coverage-setup
Expand Down
2 changes: 1 addition & 1 deletion cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Minimum version of Perl required.
# Notation suggested on https://metacpan.org/pod/Carton#PERL-VERSIONS
requires 'perl', '5.10.1';
requires 'perl', '5.16.0';

# This module provides zip/unzip for archive and shared document download/upload
requires 'Archive::Zip', '>= 1.05';
Expand Down
4 changes: 1 addition & 3 deletions src/lib/Sympa/Tools/Text.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ package Sympa::Tools::Text;

use strict;
use warnings;
use feature qw(fc);
use Encode qw();
use English qw(-no_match_vars);
use Encode::MIME::Header; # 'MIME-Q' encoding.
Expand All @@ -37,8 +38,6 @@ use MIME::EncWords;
use Text::LineFold;
use Unicode::GCString;
use URI::Escape qw();
use if ($] < 5.016), qw(Unicode::CaseFold fc);
use if (5.016 <= $]), qw(feature fc);
BEGIN { eval 'use Unicode::Normalize qw()'; }
BEGIN { eval 'use Unicode::UTF8 qw()'; }

Expand Down Expand Up @@ -286,7 +285,6 @@ sub foldcase {
my $str = shift;

return '' unless defined $str and length $str;
# Perl 5.16.0 and later have built-in fc(). Earlier uses Unicode::CaseFold.
return Encode::encode_utf8(fc(Encode::decode_utf8($str)));
}

Expand Down

0 comments on commit 387e42d

Please sign in to comment.