The Makefile.PL for Perl-RPM from rpm-4.0.3 does a numeric comparison of the version, but the versions being compared are strings. This results in undefined behavoir. Here's a patch.
Created attachment 43615 [details] Patch to fix invalid comparisons in Perl-RPM/Makefile.PL
This was fixed in rpm-4.1, now fixed in rpm-4.0.4-0.20 as well. Thanks for the patch.