other, and Encode::Alias exporting functions into Encode for it to use
as methods, broke the loading of the find_alias() Encode method in some
cases since 5.10. Breaking the recursive inheritance fixes it.
p4raw-id: //depot/perl@33486
use strict;
use warnings;
no warnings 'redefine';
-use Encode;
-our $VERSION = do { my @r = ( q$Revision: 2.7 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
+our $VERSION = '2.07_01'; #do { my @r = ( q$Revision: 2.7 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
sub DEBUG () { 0 }
use base qw(Exporter);
our %Alias; # cached known aliases
sub find_alias {
+ require Encode;
my $class = shift;
my $find = shift;
unless ( exists $Alias{$find} ) {
}
sub init_aliases {
+ require Encode;
undef_aliases();
# Try all-lower-case version should all else fails
require Config; import Config;
}
-use Test::More tests => 22;
+use Test::More tests => 23;
# open::import expects 'open' as its first argument, but it clashes with open()
sub import {
}
}
+{
+ eval q[use Encode::Alias;use open ":std", ":locale"];
+ is($@, '', 'can use :std and :locale');
+}
+
SKIP: {
skip("no perlio", 1) unless (find PerlIO::Layer 'perlio');
use open IN => ':non-existent';