3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.2 2002/12/05 13:57:22 joko |
7 |
|
# + now able to export 'scalar2utf8' |
8 |
|
# + comments |
9 |
|
# |
10 |
# Revision 1.1 2002/11/29 04:49:20 joko |
# Revision 1.1 2002/11/29 04:49:20 joko |
11 |
# + initial check-in |
# + initial check-in |
12 |
# |
# |
23 |
|
|
24 |
require Exporter; |
require Exporter; |
25 |
our @ISA = qw( Exporter ); |
our @ISA = qw( Exporter ); |
26 |
our @EXPORT_OK = qw( &var2utf8 &var_utf2iso ); |
our @EXPORT_OK = qw( &var2utf8 &var_utf2iso &scalar2utf8 ); |
27 |
|
|
28 |
use Unicode::String qw(utf8 latin1); |
use Unicode::String qw(utf8 latin1); |
29 |
|
|
30 |
|
# TODO: refactor using Greg London's "Iterate" from CPAN |
31 |
sub var2utf8 { |
sub var2utf8 { |
32 |
my $vref = shift; |
my $vref = shift; |
33 |
if (ref $vref eq 'HASH') { |
if (ref $vref eq 'HASH') { |
58 |
} |
} |
59 |
} |
} |
60 |
|
|
61 |
|
# TODO: refactor using Greg London's "Iterate" from CPAN |
62 |
sub var_utf2iso { |
sub var_utf2iso { |
63 |
my $vref = shift; |
my $vref = shift; |
64 |
if (ref $vref eq 'HASH') { |
if (ref $vref eq 'HASH') { |