Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions lib/utf8.pm
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package utf8;

# 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;

our $utf8_hint_bits = 0x00800000;
our $ascii_hint_bits = 0x00000010; # Turned off when utf8 turned on

our $VERSION = '1.27';
our $AUTOLOAD;
our $VERSION = '1.28';

sub import {
$^H |= $utf8_hint_bits;
Expand All @@ -18,12 +21,6 @@ sub unimport {
$^H &= ~$utf8_hint_bits;
}

sub AUTOLOAD {
goto &$AUTOLOAD if defined &$AUTOLOAD;
require Carp;
Carp::croak("Undefined subroutine $AUTOLOAD called");
}

1;
__END__

Expand Down
4 changes: 2 additions & 2 deletions lib/utf8.t
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@ SKIP: {

{
fresh_perl_like ('use utf8; utf8::moo()',
qr/Undefined subroutine utf8::moo/, {stderr=>1},
"Check Carp is loaded for AUTOLOADing errors")
qr/Undefined subroutine &utf8::moo/, {stderr=>1},
"Check undefined subroutines error")
}

{
Expand Down
Loading