| 1 | package Unicode::Transform; | ||
| 2 | |||
| 3 | 10 | require 5.006001; | |
| 4 | |||
| 5 | 10 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 10 | ▶ | no warnings 'utf8'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 10 | require Exporter; | |
| 9 | 10 | require DynaLoader; | |
| 10 | |||
| 11 | 10 | our $VERSION = '0.51'; | |
| 12 | |||
| 13 | 10 | our @ISA = qw(Exporter DynaLoader); | |
| 14 | |||
| 15 | 10 | our @UTF_names = qw(utf16le utf16be utf32le utf32be utf8 utf8mod utfcp1047); | |
| 16 | 10 | our @Codenames = ("unicode", @UTF_names); | |
| 17 | |||
| 18 | 10 | our %EXPORT_TAGS = ( | |
| 19 | 'from' => [ map('unicode_to_'.$_, @UTF_names) ], | ||
| 20 | 'to' => [ map($_.'_to_unicode', @UTF_names) ], | ||
| 21 | 'chr' => [ map('chr_'.$_, @Codenames) ], | ||
| 22 | 'ord' => [ map('ord_'.$_, @Codenames) ], | ||
| 23 | ); | ||
| 24 | |||
| 25 | 10 | for my $a (@Codenames) { | |
| 26 | 80 | for my $b (@Codenames) { | |
| 27 | 640 | push @{ $EXPORT_TAGS{'conv'} }, "${a}_to_${b}"; | |
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | 10 | our @EXPORT = (map @$_, @EXPORT_TAGS{qw(from to)}); | |
| 32 | 10 | our @EXPORT_OK = (map @$_, @EXPORT_TAGS{qw(conv chr ord)}); | |
| 33 | 10 | $EXPORT_TAGS{'all'} = \ @EXPORT_OK; | |
| 34 | |||
| 35 | 10 | bootstrap Unicode::Transform $VERSION; | |
| 36 | |||
| 37 | 10 | 1; | |
| 38 | __END__ | ||