in reply to checking for all packages

I'd probably use the check_install() function from Module::Load::Conditional which is a core module.

http://search.cpan.org/~bingos/Module-Load-Conditional-0.62/lib/Module/Load/Conditional.pm