You don't have the XS version of Scalar::Util
cpan> force install Scalar::Util
Again I am installing djabberd on debian via cpan, have to install make, gcc, libc6-dev, libxml2-dev, openssl, libssl-dev.
I couldn't get Net::SSLeay to install from CPAN, so I used libnet-ssleay-perl from debian.
UPDATE: See DJabberd on Debian