If a prefix is set, IDNA::Punycode incorrectly encodes strings that don't contain any ASCII characters (it adds an additional '-' between prefix and encoded string). For example, '他们为什么不说中文' ("\x{4ED6}\x{4EEC}\x{4E3A}\x{4EC0}\x{4E48}\x{4E0D}\x{8BF4}\x{4E2D}\x{6587}") is converted to 'xn---ihqwcrb4cv8a8dqg056pqjye' instead of 'xn--ihqwcrb4cv8a8dqg056pqjye' (this is an example from RFC 3492).
use strict;
use Test::More tests => 1;
use IDNA::Punycode;
use utf8;
is(encode_punycode("\x{4ED6}\x{4EEC}\x{4E3A}\x{4EC0}\x{4E48}\x{4E0D}\x{8BF4}\x{4E2D}\x{6587}"),'xn--ihqwcrb4cv8a8dqg056pqjye');