From 0f43fc9088ef519f8bd95cf48e852a436508c605 Mon Sep 17 00:00:00 2001 From: Nick Ing-Simmons Date: Thu, 3 May 2001 16:40:42 +0000 Subject: [PATCH] Allow $answer = encode($object,$text); like it says in docs. p4raw-id: //depot/perlio@9976 --- ext/Encode/Encode.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index dda842d..49e2d1e 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -136,6 +136,10 @@ sub getEncoding { my ($class,$name) = @_; my $enc; + if (ref($name) && $name->can('new_sequence')) + { + return $name; + } if (exists $encoding{$name}) { return $encoding{$name}; -- 2.7.4