If the CPAN distribution file name (libwww-perl-whatever.tar.gz) matches the
debian package name (libwww-perl), CPANPLUS blows up when building a deb if
prefix is '':
$ cpan2dist --skiptest --verbose --default-ignorelist --format
CPANPLUS::Dist::Deb --dist-opts prefix= --defaults --dist-opts
distdir=$PWD/deb LWP
eventually dies with:
Key 'file'
(/home/hdp/.cpanplus/5.8.8/build/libwww-perl-5.823/../libwww-perl_5.823-1.diff.gz)
is of invalid type for 'CPANPLUS::Internals::Utils::_move' provided by
CPANPLUS::Dist::Deb::create at
/usr/local/share/perl/5.8.8/CPANPLUS/Dist/Deb.pm line 927
[ERROR] Failed to move
'/home/hdp/.cpanplus/5.8.8/build/libwww-perl-5.823/../libwww-perl_5.823-1.diff.gz'
to its final destination
'/home/hdp/code/deb/main/pool/lib/l/libwww-perl/libwww-perl_5.823-1.diff.gz'
It failed to move because the directory
'/home/hdp/.cpanplus/5.8.8/build/libwww-perl-5.823' got moved already; it's
caught by the glob on line 917 of Deb.pm.
The source directory clearly shouldn't be moved into the debian pool
structure
at all. I'll attach a patch.