This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
No need to show internal encodings, or return them
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 10 Jan 2002 17:47:34 +0000 (17:47 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 10 Jan 2002 17:47:34 +0000 (17:47 +0000)
in random order.

p4raw-id: //depot/perl@14169

ext/Encode/Encode.pm

index 76257d4..cd94038 100644 (file)
@@ -61,7 +61,12 @@ our %winlatin2cp   = (
 sub encodings
 {
  my ($class) = @_;
- return keys %encoding;
+ return
+     map { $_->[0] }
+         sort { $a->[1] cmp $b->[1] }
+               map { [$_, lc $_] }
+                   grep { $_ ne 'Internal' }
+                        keys %encoding;
 }
 
 sub findAlias