Hability to do GSSAPI for SASL in PERL is great it allow script connections to services (IMAP, LDAP, ...) that require a password without storing the password in clear text.

But current version of libauthen-sasl-cyrus-perl in Debian Squeeze is broken at least partially:

perl: ../../../src/util/support/threads.c :351 : krb5int_key_register:  L'assertion « destructors_set[keynum] == 0 » a échoué</code>

It seems to be the case for some others.

While waiting for the bug to be fixed, there is a solution use the non-cyrus GSSAPI module for SASL, it depends on the PERL implementation of gssapi. By chance it's debian repository so it's rather easy to get them:

sudo apt-get install libgssapi-perl libauthen-sasl-perl

And then in the perl program, insists on using the "pure" PERL of the SASL library:

use Authen::SASL qw(Perl);

Et voilà that's all !