Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / rt / t / api / i18n_guess.t
index 956cb15..0a99011 100644 (file)
@@ -4,10 +4,8 @@ use warnings;
 
 use RT::Test tests => 16;
 
-use Encode qw(encode);
-
-use constant HAS_ENCODE_GUESS => do { local $@; eval { require Encode::Guess; 1 } };
-use constant HAS_ENCODE_DETECT => do { local $@; eval { require Encode::Detect::Detector; 1 } };
+use constant HAS_ENCODE_GUESS => Encode::Guess->require;
+use constant HAS_ENCODE_DETECT => Encode::Detect::Detector->require;
 
 my $string = "\x{442}\x{435}\x{441}\x{442} \x{43f}\x{43e}\x{434}\x{434}\x{435}\x{440}\x{436}\x{43a}\x{430}";