Unverified Commit 09686d2c authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #683 from ikedas/issue-620 by ikedas

Drop support for Perl 5.8.x (#620)
parents 8633f1c1 2c045b9d
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
- coverage-report - coverage-report
- make clean - make clean
"5.8":
<<: *job
"5.10": "5.10":
<<: *job <<: *job
"5.12": "5.12":
......
...@@ -13,7 +13,6 @@ perl: ...@@ -13,7 +13,6 @@ perl:
- "5.14" - "5.14"
- "5.12" - "5.12"
- "5.10" - "5.10"
- "5.8"
matrix: matrix:
include: include:
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Minimum version of Perl required. # Minimum version of Perl required.
# Notation suggested on https://metacpan.org/pod/Carton#PERL-VERSIONS # Notation suggested on https://metacpan.org/pod/Carton#PERL-VERSIONS
requires 'perl', '5.8.1'; requires 'perl', '5.10.1';
# This module provides zip/unzip for archive and shared document download/upload # This module provides zip/unzip for archive and shared document download/upload
requires 'Archive::Zip', '>= 1.05'; requires 'Archive::Zip', '>= 1.05';
...@@ -178,8 +178,9 @@ recommends 'Net::DNS', '>= 0.65'; ...@@ -178,8 +178,9 @@ recommends 'Net::DNS', '>= 0.65';
recommends 'Net::SMTP'; recommends 'Net::SMTP';
# Normalizes file names represented by Unicode # Normalizes file names represented by Unicode
# Note: Perl 5.8.1 bundles this version. # Note: Perl 5.8.1 bundles version 0.23.
recommends 'Unicode::Normalize', '>= 0.23'; # Note: Perl 5.10.1 bundles this version (per Unicode 5.1.0).
recommends 'Unicode::Normalize', '>= 1.03';
### Features ### Features
## ##
...@@ -289,8 +290,9 @@ feature 'soap', 'Required if you want to run the Sympa SOAP server that provides ...@@ -289,8 +290,9 @@ feature 'soap', 'Required if you want to run the Sympa SOAP server that provides
}; };
feature 'Unicode::Normalize', 'Normalizes file names represented by Unicode.' => sub { feature 'Unicode::Normalize', 'Normalizes file names represented by Unicode.' => sub {
# Note: Perl 5.8.1 bundles this version. # Note: Perl 5.8.1 bundles version 0.23.
requires 'Unicode::Normalize', '>= 0.23'; # Note: Perl 5.10.1 bundles this version (per Unicode 5.1.0).
requires 'Unicode::Normalize', '>= 1.03';
}; };
on 'test' => sub { on 'test' => sub {
......
...@@ -37,7 +37,7 @@ use MIME::EncWords; ...@@ -37,7 +37,7 @@ use MIME::EncWords;
use Text::LineFold; use Text::LineFold;
use Unicode::GCString; use Unicode::GCString;
use URI::Escape qw(); use URI::Escape qw();
use if (5.008 < $] && $] < 5.016), qw(Unicode::CaseFold fc); use if ($] < 5.016), qw(Unicode::CaseFold fc);
use if (5.016 <= $]), qw(feature fc); use if (5.016 <= $]), qw(feature fc);
BEGIN { eval 'use Unicode::Normalize qw()'; } BEGIN { eval 'use Unicode::Normalize qw()'; }
...@@ -216,15 +216,10 @@ sub escape_chars { ...@@ -216,15 +216,10 @@ sub escape_chars {
sub foldcase { sub foldcase {
my $str = shift; my $str = shift;
return '' unless defined $str and length $str;
if ($] <= 5.008) { return '' unless defined $str and length $str;
# Perl 5.8.0 does not support Unicode::CaseFold. Use lc() instead. # Perl 5.16.0 and later have built-in fc(). Earlier uses Unicode::CaseFold.
return Encode::encode_utf8(lc(Encode::decode_utf8($str))); return Encode::encode_utf8(fc(Encode::decode_utf8($str)));
} else {
# later supports it. Perl 5.16.0 and later have built-in fc().
return Encode::encode_utf8(fc(Encode::decode_utf8($str)));
}
} }
my %legacy_charsets = ( my %legacy_charsets = (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment