2013/12/19 Attila Bárdi <attila.bardi@gmail.com>
 
But I don't know the solution.

You must deal with decoding in your module, but in your script it should work like this:

#!/usr/bin/perl
use strict;
use warnings;
use Encode;
binmode STDOUT, 'utf8';

my $somebody = LdapPerson->new();
$somebody = LdapPerson->search('attila.bardi@example.com');
print "displayname: " . decode('utf-8', $somebody->get_displayName() ) . "\n"

In Dancer you must omit setting binmode on STDOUT, because Dancer sets it itself.  Hope it gives  some hints how to deal with such problem.

--
Wbr,
Kõike hääd,

Gunnar