The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use strict;
use warnings;
use Test::More tests => 1;

use Lingua::JA::Gal;
use utf8;

my $kanjionly = sub {
    my ($char, $suggestions, $options) = @_;
    
    if ($char =~ /\p{Han}/) {
        return $suggestions->[ int(rand @$suggestions) ];
    } else {
        return $char;
    }
};

is( Lingua::JA::Gal->gal('WCはお便所!', { callback => $kanjionly }), 'WCはおイ更戸斤!' );