There's no doubt some more sophisticated way of doing this, but I'd probably just try to require each package in turn in a string eval. This should give you the idea:
#!/usr/bin/perl use strict; use warnings; my @packages = qw/ Net::IP Net::CIDR List::BinarySearch /; for my $package (@packages) { eval "require $package"; if ($@) { print "Couldn't find package '$package'\n"; } else { print "Found package '$package'\n"; } }
In reply to Re: checking for all packages
by philipbailey
in thread checking for all packages
by Wiggins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |