From b37f565e698dfd73710b51b423d7582fee77f958 Mon Sep 17 00:00:00 2001 From: James Raspass Date: Fri, 19 Sep 2025 01:38:26 +0100 Subject: [PATCH] Modernise the utf8 pragma a little - Move the version declaration into the package line. - Use v5.40 to get strict, warnings, and the module_true feature. --- lib/utf8.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/utf8.pm b/lib/utf8.pm index fca8f127e673..fabbba46365b 100644 --- a/lib/utf8.pm +++ b/lib/utf8.pm @@ -1,17 +1,14 @@ -package utf8; +package utf8 1.29; # This file only defines the import/unimport subs, the rest are implemented by # always-present functions in the perl interpreter itself. # See also `universal.c` in the perl source -use strict; -use warnings; +use v5.40; our $utf8_hint_bits = 0x00800000; our $ascii_hint_bits = 0x00000010; # Turned off when utf8 turned on -our $VERSION = '1.28'; - sub import { $^H |= $utf8_hint_bits; $^H &= ~$ascii_hint_bits; @@ -21,7 +18,6 @@ sub unimport { $^H &= ~$utf8_hint_bits; } -1; __END__ =head1 NAME