print "1..0 # Skip: not perlio\n";
exit 0;
}
+ unless (eval { require Encode } ) {
+ print "1..0 # Skip: not Encode\n";
+ exit 0;
+ }
}
print "1..14\n";
}
{
- use Encode;
open(my $i,'<:encoding(iso-8859-7)',$grk);
print "ok 1\n";
open(my $o,'>:utf8',$utf);
print "1..0 # Skip: EBCDIC\n";
exit 0;
}
+ unless( eval { require Encode } ) {
+ print "1..0 # Skip: No Encode\n";
+ exit 0;
+ }
plan (9);
+ import Encode qw(:fallback_all);
}
-use Encode qw(:fallback_all);
# $PerlIO::encoding = 0; # WARN_ON_ERR|PERLQQ;
# point Test::More tidily prints up 1..79 as if I meant to finish there.
use Test::More tests=>148;
use bytes ();
-use Encode qw(is_utf8);
my %utf8hash;
$Storable::canonical = $Storable::canonical; # Shut up a used only once warning.
foreach my $layer (split(/\s+/,$dscp)) {
$layer =~ s/^://;
if ($layer eq 'locale') {
- use Encode;
+ require Encode;
_get_locale_encoding()
unless defined $locale_encoding;
(warnings::warnif("layer", "Cannot figure out an encoding to use"), last)
SKIP: {
skip("no perlio, no :utf8", 1) unless (find PerlIO::Layer 'perlio');
+ skip("no Encode for locale layer", 1) unless eval { require Encode };
# now load a real-looking locale
$ENV{LC_ALL} = ' .utf8';
import( 'IN', 'locale' );