From bac74b5934f22cc3d0e971d26fe0275f7f5db7b3 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 29 Mar 2017 11:58:33 +0200 Subject: [PATCH] common: enable perl v5.14 features everywhere Replace page-specific usage by global default. --- base.plp | 1 - browser.plp | 2 -- chars.plp | 1 - charset.plp | 1 - common.inc.plp | 2 +- digraphs.plp | 1 - digraphs.vim.plp | 2 +- font.plp | 1 - latin.plp | 1 - termcol.inc.pl | 3 +-- termcol.plp | 1 - unicode.plp | 1 - 12 files changed, 3 insertions(+), 14 deletions(-) diff --git a/base.plp b/base.plp index 0c9ba8b..f1ed06c 100644 --- a/base.plp +++ b/base.plp @@ -97,7 +97,6 @@ for my $n (2 .. $count) {

Duplication (2ⁿ)

<: -use 5.010; sub showint { my ($int, $radix) = @_; my @digits; diff --git a/browser.plp b/browser.plp index 0fc1627..bdde90e 100644 --- a/browser.plp +++ b/browser.plp @@ -1,6 +1,4 @@ <(common.inc.plp)><: -use 5.010; -use utf8; use List::Util qw(sum max first); no if $] >= 5.018, warnings => 'experimental::smartmatch'; diff --git a/chars.plp b/chars.plp index 83c40ab..a637eae 100644 --- a/chars.plp +++ b/chars.plp @@ -10,7 +10,6 @@ Html({ data => [qw( unicode-cover.inc.pl ttfsupport unicode-char.inc.pl )], }); -use 5.010; use Shiar_Sheet::FormatChar; my $glyphs = Shiar_Sheet::FormatChar->new; diff --git a/charset.plp b/charset.plp index 3315669..3bf294e 100644 --- a/charset.plp +++ b/charset.plp @@ -1,5 +1,4 @@ <(common.inc.plp)><: -use 5.014; Html({ title => 'charset cheat sheet', diff --git a/common.inc.plp b/common.inc.plp index fa0e14f..cfd961e 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -1,6 +1,6 @@ <: +use 5.014; use utf8; -use strict; use warnings; no warnings 'qw'; # you know what you doing no warnings 'uninitialized'; # save some useless checks for more legible code diff --git a/digraphs.plp b/digraphs.plp index aca0766..df84755 100644 --- a/digraphs.plp +++ b/digraphs.plp @@ -1,5 +1,4 @@ <(common.inc.plp)><: -use 5.010; # state my $mode = ($ENV{PATH_INFO} // '') eq '/xorg' || exists $get{xorg}; my $modename = $mode ? 'X.Org' : 'RFC-1345'; diff --git a/digraphs.vim.plp b/digraphs.vim.plp index d19b72a..423c057 100644 --- a/digraphs.vim.plp +++ b/digraphs.vim.plp @@ -1,5 +1,5 @@ <: -use strict; +use 5.014; use warnings; use open IO => ':utf8'; diff --git a/font.plp b/font.plp index 402c476..fd55017 100644 --- a/font.plp +++ b/font.plp @@ -1,5 +1,4 @@ <(common.inc.plp)><: -use 5.014; my $font = $ENV{PATH_INFO} =~ s{^/}{}r; diff --git a/latin.plp b/latin.plp index ed68cae..9dd8fe9 100644 --- a/latin.plp +++ b/latin.plp @@ -1,5 +1,4 @@ <(common.inc.plp)><: -use 5.014; Html({ title => 'latin alphabet cheat sheet', diff --git a/termcol.inc.pl b/termcol.inc.pl index 56e93e2..b575944 100644 --- a/termcol.inc.pl +++ b/termcol.inc.pl @@ -1,5 +1,4 @@ -use strict; -use 5.010; +use 5.014; use Shiar_Sheet::Colour 1.05; +{ diff --git a/termcol.plp b/termcol.plp index 6f7a55d..fbf7fe4 100644 --- a/termcol.plp +++ b/termcol.plp @@ -35,7 +35,6 @@ print
<: -use 5.010; use Shiar_Sheet::Colour 1.04; use List::Util qw( min max ); use POSIX qw( ceil ); diff --git a/unicode.plp b/unicode.plp index 5937545..4d28dbd 100644 --- a/unicode.plp +++ b/unicode.plp @@ -26,7 +26,6 @@ i^k or i^vu respectively in Vim.
<: -use 5.010; use Shiar_Sheet::FormatChar; my $glyphs = Shiar_Sheet::FormatChar->new; -- 2.30.0