in reply to how to test my perl-prerequesites on a Linux-box - with command line-approach
#!/usr/bin/perl -l use strict; use warnings; use Module::Load::Conditional qw[ can_load check_install requires ]; $Module::Load::Conditional::CHECK_INC_HASH = 1; my $rv = check_install( module => 'WWW::Mechanize::Firefox', version => 0.56) or warn "WWW::Mechanize::Firefox is not installed"; print "WWW::Mechanize::Firefox is up to date", if $rv->{'uptodate'}; print "WWW::Mechanize::Firefox version is: ", $rv->{'version'}; print "WWW::Mechanize::Firefox is installed as file: ", $rv->{'file'}; print "WWW::Mechanize::Firefox also requires that these modules be installed: "; print join "\n", requires('WWW::Mechanize::Firefox');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to test my perl-prerequesites on a Linux-box - with command line-approach
by Perlbeginner1 (Scribe) on Feb 19, 2012 at 13:33 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |