I don't know if its Debian. The other day I ran into this exact problem with Strawberry Perl 5.10 on Windows XP, When installing modules with CPAN, I would get get an "out of memory" error typically during the modules' tests. The thing is it was intermittent and eventually I did get my modules installed successfully. As I consider Windows to be incomprehensible voodoo to be avoided in the best of situations, I didn't look into it further but this is just a data point for your consideration.