perl-module: Fix build errors and ignore warnings.