mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
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.
This commit is contained in:
parent
4913086621
commit
23ae7f95ea
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user