From dd9703c97d9c97246c909791992f0b966b2be5d5 Mon Sep 17 00:00:00 2001 From: Audrey Tang Date: Tue, 12 Mar 2002 20:56:46 +0800 Subject: [PATCH] Re: ext/Encode/t/Tcl.t on VMS @15173 Message-Id: <20020312045646.GA7689@not.autrijus.org> (Private mail.) p4raw-link: @15173 on //depot/perl: 2a3d532f608c7c5e0c317bfba640d088125b93a3 p4raw-id: //depot/perl@15182 --- ext/Encode/Encode.pm | 8 ++++---- ext/Encode/lib/Encode/Tcl.pm | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index 8a9cc00..6a8fb89 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -228,7 +228,7 @@ sub define_encoding sub getEncoding { - my ($class,$name) = @_; + my ($class,$name,$skip_external) = @_; my $enc; if (ref($name) && $name->can('new_sequence')) { @@ -250,7 +250,7 @@ sub getEncoding $oc = $class->findAlias($lc) if $lc ne $name; return $oc if defined $oc; - if (exists $external_tables{$lc}) + if (!$skip_external and exists $external_tables{$lc}) { require $external_tables{$lc}; return $encoding{$name} if exists $encoding{$name}; @@ -261,8 +261,8 @@ sub getEncoding sub find_encoding { - my ($name) = @_; - return __PACKAGE__->getEncoding($name); + my ($name,$skip_external) = @_; + return __PACKAGE__->getEncoding($name,$skip_external); } sub encode diff --git a/ext/Encode/lib/Encode/Tcl.pm b/ext/Encode/lib/Encode/Tcl.pm index 95ed572..c423d8e 100644 --- a/ext/Encode/lib/Encode/Tcl.pm +++ b/ext/Encode/lib/Encode/Tcl.pm @@ -21,7 +21,7 @@ sub INC_search if ($name =~ /^(.*)\.enc$/) { my $canon = $1; - my $obj = find_encoding($canon); + my $obj = find_encoding($canon, 1); # skip external tables if (!defined($obj)) { my $obj = bless { Name => $canon, File => "$dir/Encode/$name"},__PACKAGE__; -- 2.7.4