in reply to how to test my perl-prerequesites on a Linux-box - with command line-approach

We're going to test WWW::Mechanize::Firefox by using Module::Load::Conditional. It'll output all the prerequisites, then you can go back and add each one to the list if you want to.
#!/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');
  • Comment on Re: how to test my perl-prerequesites on a Linux-box - with command line-approach
  • Download Code

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
    hello khen many many thanks for the answer... great to hear from you!!!

    i just added the adviced module - btw - NOTE -see that MAKE is running propperly - can we say that - guess so!!

    cpan[3]> install Module::Load::Conditional Running install for module 'Module::Load::Conditional' Running make for B/BI/BINGOS/Module-Load-Conditional-0.46.tar.gz Fetching with LWP: http://artfiles.org/cpan.org/authors/id/B/BI/BINGOS/Module-Load-Condit +ional-0.46.tar.gz Fetching with LWP: http://artfiles.org/cpan.org/authors/id/B/BI/BINGOS/CHECKSUMS Checksum for /root/.cpan/sources/authors/id/B/BI/BINGOS/Module-Load-Co +nditional-0.46.tar.gz ok Scanning cache /root/.cpan/build for sizes ...................................................................... +......DONE CPAN.pm: Going to build B/BI/BINGOS/Module-Load-Conditional-0.46.tar +.gz Checking if your kit is complete... Looks good Writing Makefile for Module::Load::Conditional Writing MYMETA.yml and MYMETA.json cp lib/Module/Load/Conditional.pm blib/lib/Module/Load/Conditional.pm Manifying blib/man3/Module::Load::Conditional.3pm BINGOS/Module-Load-Conditional-0.46.tar.gz /usr/bin/make -- OK 'YAML' not installed, will not store persistent state Running make test + + PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t + t/01_Module_Load_Conditional.t .. ok + + t/02_Parse_Version.t ............ ok + + All tests successful. + + Files=2, Tests=104, 0 wallclock secs ( 0.05 usr 0.01 sys + 0.14 cus +r 0.02 csys = 0.22 CPU) + Result: PASS + + BINGOS/Module-Load-Conditional-0.46.tar.gz /usr/bin/make test -- OK Running make install Installing /usr/lib/perl5/5.14.2/Module/Load/Conditional.pm Installing /usr/share/man/man3/Module::Load::Conditional.3pm Appending installation info to /usr/lib/perl5/5.14.2/i586-linux-thread +-multi/perllocal.pod BINGOS/Module-Load-Conditional-0.46.tar.gz /usr/bin/make install -- OK



    what do you say:: i just added the adviced module - btw - NOTE -see that MAKE is running propperly - can we say that - guess so!!

    greetings
A reply falls below the community's threshold of quality. You may see it by logging in.