FWIW, the OPs problem is a job for Makefile.PL/Build.PL
In reply to Re^2: script to check modules exist... by Anonymous Monk in thread script to check modules exist... by Anonymous Monk