Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by Perlbeginner1 (Scribe)
on Feb 19, 2012 at 11:42 UTC ( [id://954855]=perlquestion: print w/replies, xml ) Need Help??

Perlbeginner1 has asked for the wisdom of the Perl Monks concerning the following question:

well dear perl-friends,

i tried to install Perl on opensuse 12.1. Then tried to added

mozrepl (as a mozilla-addon) - i guess that this succeeded - Note i have the according checkfields in the browser like start / stop mozrepl; Besides this i added the module WWW::Mechanize::Firefox; well i am pretty unsure if this succeded - Note: i have terrible issues on my new installe opensuse 12.1 - i have troubles with Make.. see the update - see what happened with the install the www::mechanize::firefox

linux-wyee:/home/martin/perl # cpan cpan shell -- CPAN exploration and modules installation (v1.960001) Enter 'h' for help. cpan[1]> look WWW::Mechanize::Firefox Going to read '/root/.cpan/Metadata' Database was generated on Sat, 11 Feb 2012 23:11:59 GMT Fetching with LWP: http://artfiles.org/cpan.org/authors/01mailrc.txt.gz Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz' ...................................................................... +......DONE Fetching with LWP: http://artfiles.org/cpan.org/modules/02packages.details.txt.gz Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Sat, 18 Feb 2012 23:13:48 GMT .............. New CPAN.pm version (v1.9800) available. [Currently running version is v1.960001] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session. ..............................................................DONE Fetching with LWP: http://artfiles.org/cpan.org/modules/03modlist.data.gz Going to read '/root/.cpan/sources/modules/03modlist.data.gz' ...................................................................... +......DONE Going to write /root/.cpan/Metadata Running look for module 'WWW::Mechanize::Firefox' + + + + Trying to open a subshell in the build directory... + + Fetching with LWP: + + http://artfiles.org/cpan.org/authors/id/C/CO/CORION/WWW-Mechanize-Fire +fox-0.59.tar.gz + Fetching with LWP: + + http://artfiles.org/cpan.org/authors/id/C/CO/CORION/CHECKSUMS + + Checksum for /root/.cpan/sources/authors/id/C/CO/CORION/WWW-Mechanize- +Firefox-0.59.tar.gz ok Scanning cache /root/.cpan/build for sizes ...................................................................... +......DONE Working directory is /root/.cpan/build/WWW-Mechanize-Firefox-0.59-tEPg +Tt linux-wyee:~/.cpan/build/WWW-Mechanize-Firefox-0.59-tEPgTt #




Question - how can i test the prerequesites that i need to run a little perl-script.

how to do the test .- to find out that all is set up correctly?

Can i apply some tests to see if i have all installed it correctly.
I need to test
Make
WWW::Mechanize::Firefox;
mozrepl



Guess that do the tests with the command line...

love to hear from you

greetings pb1 update:

Replies are listed 'Best First'.
Re: how to test my perl-prerequesites on a Linux-box - with command line-approach
by marto (Cardinal) on Feb 19, 2012 at 11:54 UTC

    You've posted several threads on the subject of WWW::Mechanize::Firefox, so some of this advice may have already been given. There are examples in WWW::Mechanize::Firefox::Examples, if you run this and don't have the prerequisites installed this will be clearly reported on the command line.

    "i tried to install Perl on opensuse 12.1."

    Tried to install it? Did you have problems? If so, you need to explain what what wrong otherwise you restrict the advice people can give to truisms.

    "WWW::Mechanize::Firefox; well i am pretty unsure if this succeded"

    See above, read and understand How do I post a question effectively?.

    Update:

    "Note: i have terrible issues on my new installe opensuse 12.1 - i have troubles with Make"

    Didn't we address this in do i need to have a better make - all perl-things fail? If it's something else you need to be clear when describing your problems.

Re: how to test my perl-prerequesites on a Linux-box - with command line-approach
by Corion (Patriarch) on Feb 19, 2012 at 11:56 UTC

    WWW::Mechanize::Firefox comes with a lot of Examples. Why don't you try them?

    It also comes with a test suite that gets run upon installation. Why don't you run that test suite? If you somehow installed WWW::Mechanize::Firefox without running the test suite, I can only recommend reinstalling, or at least retesting:

    >cpan cpan> look WWW::Mechanize::Firefox > perl Makefile.PL > make test # watch the test suite run

    If you suspect that make is broken, there is little we can do to help you, especially as you don't tell us the symptoms. I recommend you hire a competent system administrator to handle system maintenance and module installation for you.

      good day dear corion

      see the update - see what happened with the install the www::mechanize::firefox

      linux-wyee:/home/martin/perl # cpan cpan shell -- CPAN exploration and modules installation (v1.960001) Enter 'h' for help. cpan[1]> look WWW::Mechanize::Firefox Going to read '/root/.cpan/Metadata' Database was generated on Sat, 11 Feb 2012 23:11:59 GMT Fetching with LWP: http://artfiles.org/cpan.org/authors/01mailrc.txt.gz Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz' ...................................................................... +......DONE Fetching with LWP: http://artfiles.org/cpan.org/modules/02packages.details.txt.gz Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Sat, 18 Feb 2012 23:13:48 GMT .............. New CPAN.pm version (v1.9800) available. [Currently running version is v1.960001] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session. ..............................................................DONE Fetching with LWP: http://artfiles.org/cpan.org/modules/03modlist.data.gz Going to read '/root/.cpan/sources/modules/03modlist.data.gz' ...................................................................... +......DONE Going to write /root/.cpan/Metadata Running look for module 'WWW::Mechanize::Firefox' + + + + Trying to open a subshell in the build directory... + + Fetching with LWP: + + http://artfiles.org/cpan.org/authors/id/C/CO/CORION/WWW-Mechanize-Fire +fox-0.59.tar.gz + Fetching with LWP: + + http://artfiles.org/cpan.org/authors/id/C/CO/CORION/CHECKSUMS + + Checksum for /root/.cpan/sources/authors/id/C/CO/CORION/WWW-Mechanize- +Firefox-0.59.tar.gz ok Scanning cache /root/.cpan/build for sizes ...................................................................... +......DONE Working directory is /root/.cpan/build/WWW-Mechanize-Firefox-0.59-tEPg +Tt linux-wyee:~/.cpan/build/WWW-Mechanize-Firefox-0.59-tEPgTt #


      how do you like this!? Corion i love to hear from you ... if this is set up right then i can proceed and go to the next step and do some tests -

      so i love to hear from you
      many many greetings from Good Old Europe .-

        I seriously recommend you learn about your operating system and how to do things with it.

        The output seems to suggest to me that you ran the first command I showed you, look WWW::Mechanize::Firefox. What happened when you ran the other commands that were to be run after that one?

        Please work on your reporting capability. If you want to get immediate answers, please put some effort in your question and provide all relevant information. If you don't understand instructions given to you, either try them all out and live with the consequences or ask before you try them out. Doing system administration through this forum is quite tedious, so I recommend that you find somebody who is willing to set up your system for you, or who is willing to teach you how to operate the system yourself. I am not that person.

        I see that you are using the system perl to install modules from CPAN. This is highly recommended against. Use your OS package manager or talk to your system administrator how to install Perl modules for the system perl. The recommended way for a Perl developer is to install Perl modules locally (see local::lib) or to compile their own private version of Perl (see App::perlbrew).

Re: how to test my perl-prerequesites on a Linux-box - with command line-approach
by Khen1950fx (Canon) on Feb 19, 2012 at 13:17 UTC
    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');
      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.
[OFF] Re: how to test my perl-prerequesites on a Linux-box - with command line-approach
by Ralesk (Pilgrim) on Feb 19, 2012 at 20:59 UTC

    Could you please edit out those trailing spaces from your terminal output so as not to mess with the site layout so heavily? I guess you use Konsole and openSuse haven't patched it to behave properly yet in your release.

      Could you please edit out those trailing spaces from your terminal output so as not to mess with the site layout so heavily?

      The OP shouldn't have to edit his copy/paste to remove whitespace since the OP is using code tags, and it is job of code tags to perform wrapping of too long lines. If you turned this feature off, you can customize your css to wrap the lines for you.

        Those lines aren’t code, they shouldn’t actually be in code tags, but in samp (I vaguely remember a monk starting a thread here about that, not sure if it’s allowed now), or as a fallback, in pre. Those trailing spaces are insignificant ones, put into the clipboard by a buggy terminal, so yes, it should be the OP who should fix his paste, because it’s broken.

        I have turned off the wrapping indeed, because those +-prefixed lines looked horrible and made things harder to read. 99.99% of code tags fit in my screen, so I don’t need CSS to mangle people’s code for me — in fact, that would make things just as bad as the PerlMonks default code mangling.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://954855]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-03-29 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found