#16
  1. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    Yes, you do.

    As I said, look for lines stating: "Can't locate <module> in @INC"

    I see two:

    Can't locate MozRepl.pm in @INC
    Can't locate AnyEvent.pm in @INC
    I mentioned AnyEvent earlier.

    Install both:
    sudo cpan install AnyEvent
    sudo cpan install MozRepl
    Then try
    sudo cpan install MozRepl::RemoteObject
    again
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    339
    Rep Power
    0
    hello dear keath

    the installation for anyEvent went nice - without any issues - i had a successful report after the process

    but the installation of the two last things seems to have issues

    i got a interesting report - see below,.



    Originally Posted by keath
    Yes, you do.

    As I said, look for lines stating: "Can't locate <module> in @INC"

    I see two:



    I mentioned AnyEvent earlier.

    Install both:




    Then try

    again
    Code:
    
    
    
    
    
    #   Failed test at t/20-plugin-json.t line 17.
    #          got: '"{"a":1,"b":2}"'
    #     expected: '{"a":1,"b":2}'
    # Looks like you failed 1 test of 2.
    t/20-plugin-json.t .................... Dubious, test returned 1 (wstat 256, 0x100)
    Failed 1/2 subtests 
    t/pod-coverage.t ...................... skipped: Test::Pod::Coverage 1.04 required for testing POD coverage
    t/pod.t ............................... skipped: Test::Pod 1.14 required for testing POD
    
    Test Summary Report
    -------------------
    t/10-plugin-repl-enter.t            (Wstat: 512 Tests: 3 Failed: 2)
      Failed tests:  2-3
      Non-zero exit status: 2
    t/16-plugin-repl-home.t             (Wstat: 256 Tests: 2 Failed: 1)
      Failed test:  2
      Non-zero exit status: 1
    t/18-plugin-repl-util-help_url_for.t (Wstat: 768 Tests: 4 Failed: 3)
      Failed tests:  2-4
      Non-zero exit status: 3
    t/19-plugin-repl-util-doc_for.t     (Wstat: 768 Tests: 7 Failed: 3)
      Failed tests:  2-3, 5
      Non-zero exit status: 3
    t/20-plugin-json.t                  (Wstat: 256 Tests: 2 Failed: 1)
      Failed test:  2
      Non-zero exit status: 1
    Files=14, Tests=42,  3 wallclock secs ( 0.08 usr  0.03 sys +  2.44 cusr  0.19 csys =  2.74 CPU)
    Result: FAIL
    Failed 5/14 test programs. 10/42 subtests failed.
    make: *** [test_dynamic] Fehler 255
      ZIGOROU/MozRepl-0.06.tar.gz
      /usr/bin/make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
      reports ZIGOROU/MozRepl-0.06.tar.gz
    Running make install
      make test had returned bad status, won't install without force
    martin@linux-70ce:~>


    and this following one -



    Code:
    t/11-memleak-constant.t ........ skipped: Couldn't connect to MozRepl: Can't locate MozRepl.pm in @INC (@INC contains: /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/lib /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/arch /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.16.2 /usr/lib/perl5/vendor_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.16.2 /usr/lib/perl5/5.16.2/i586-linux-thread-multi /usr/lib/perl5/5.16.2 /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.16.2 /usr/lib/perl5/site_perl .) at /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/lib/MozRepl/RemoteObject.pm line 402.
    t/11-memleak-declare.t ......... skipped: Couldn't connect to MozRepl: Can't locate MozRepl.pm in @INC (@INC contains: /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/lib /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/arch /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.16.2 /usr/lib/perl5/vendor_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.16.2 /usr/lib/perl5/5.16.2/i586-linux-thread-multi /usr/lib/perl5/5.16.2 /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.16.2 /usr/lib/perl5/site_perl .) at /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/lib/MozRepl/RemoteObject.pm line 402.
    t/11-memleak.t ................. skipped: Couldn't connect to MozRepl: Can't locate MozRepl.pm in @INC (@INC contains: /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/lib /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/arch /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.16.2 /usr/lib/perl5/vendor_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.16.2 /usr/lib/perl5/5.16.2/i586-linux-thread-multi /usr/lib/perl5/5.16.2 /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.16.2 /usr/lib/perl5/site_perl .) at /root/.cpan/build/MozRepl-RemoteObject-0.36-bRqORE/blib/lib/MozRepl/RemoteObject.pm line 402.
    t/99-changes.t ................. # Checking for version 0.36
    t/99-changes.t ................. ok   
    t/99-manifest.t ................ ok   
    t/99-pod.t ..................... skipped: Test::Pod required for testing POD
    t/99-todo.t .................... ok   
    t/99-unix-text.t ............... ok   
    t/99-versions.t ................ skipped: File::Slurp needed for testing
    All tests successful.
    Files=34, Tests=35,  7 wallclock secs ( 0.12 usr  0.03 sys +  2.54 cusr  0.28 csys =  2.97 CPU)
    Result: PASS
      CORION/MozRepl-RemoteObject-0.36.tar.gz
    Tests succeeded but one dependency not OK (MozRepl)
      CORION/MozRepl-RemoteObject-0.36.tar.gz
      [dependencies] -- NA
    Running make install
      make test had returned bad status, won't install without force
    martin@linux-70ce:~>

    what goes wrong here !?
  4. #18
  5. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    Well, the second failed because the first did. You won't be able to install MozRepl::RemoteObject until MozRepl is installed. You need to concentrate on that.

    I'm not sure you posted enough of the error to see what the problem is, but it did fail on a json test, so I would try to install JSON.

    sudo cpan install JSON
    When it asks if you want to install JSON_XS, answer no. See if you can get everything to work with the base version first.
  6. #19
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    339
    Rep Power
    0
    hi keath

    well json seems to be installed

    btw . see more of the above mentioned report further below....

    Code:
    NA
    Running make install
      make test had returned bad status, won't install without force
    martin@linux-70ce:~>  sudo cpan install JSON
    root's password:
    Reading '/root/.cpan/Metadata'
      Database was generated on Thu, 16 May 2013 17:41:02 GMT
    JSON is up to date (2.57).
    martin@linux-70ce:~>

    see more results ....

    http://pastebin.com/Crx9APa8

    can you see which issue causes the troubles?
  8. #20
  9. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    No, I still can't see the top of the error list, which is the important part. Don't need the bottom section concerning MozRepl::RemoteObject. You shouldn't even attempt installing that yet.

    You can look at the prerequisite list and make sure these things are installed. One is Template::Toolkit, which I did ask you to install first. Might want to make sure that is there.

    MozRepl dependencies

    Another thing to try would be to download MozRepl directly as you did for WWW-Mechanize-Firefox, and try to build it manually.

    That's what I'd try to do.

    MozRepl

    Code:
    INSTALLATION
    
    To install this module, run the following commands:
    
        perl Makefile.PL
        make
        make test
        make install
  10. #21
  11. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    chennai
    Posts
    3
    Rep Power
    0
    Hi Guy,

    i run this program. Please to use this code and try to get the output.

    use WWW::Mechanize::Firefox;
    my $mech = WWW::Mechanize::Firefox->new();

    open(INPUT, "urls.txt") or die "Can't open file: $!";

    while (<INPUT>) {
    chomp;
    $mech->get($_);
    my $png = $mech->content_as_png();
    }
    close(INPUT);
    exit;
  12. #22
  13. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    Doesn't look like there would be any output becuause you do not save or print $png.

    Here's a similar test file, if you want to test.

    Code:
    #!/usr/bin/perl
    use strict;
    use warnings;
    
    use WWW::Mechanize::Firefox;
    
    my @urls = qw(
    	http://www.google.com
    	http://www.yahoo.com
    	http://www.cnn.com
    	http://www.bing.com
    	http://www.nbcnews.com
    );
    
    my $temp = '/tmp';
    my $mech = WWW::Mechanize::Firefox->new('create');
    
    foreach my $url (@urls){
    	my ($name) = $url =~ /www\.(\w+)\.com/;
    	print "creating $name.png\n";
    	 
    	$mech->get($url);
    	sleep(5);
    	my $png = $mech->content_as_png(undef, undef, {width => 240, height => 240});
    	
    	my $file = "$temp/$name".".png";
    	open my $fh, ">", $file or die "couldnt create $file";
    	binmode $fh;
    	print $fh $png;
    	close $fh;
    }
    
    print "done\n";
  14. #23
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    339
    Rep Power
    0
    Hello Keath - and hello James,

    @James - wellcome at this great forum - and thx for running the code ;-)

    [only a short answer since i am not at home right now. i am in the office - so i do not have the perl-machine with the installation with me. I get home later the evening then i can continue the work on the notebook with Perl, then i will do all you adviced me!]

    Keath, many many thanks for the help in this sophisticated task.
    When i am at home later today i will try to install Template::Toolkit

    on a sidenote: Well we tried to install www::mechanize::firefox through CPAN. The hard thing is that i face that CPAN does not handle all dependencies, Isn't it supposed to handle all dependencies automatically?

    We see that there are loads of dependencies that need to be installed before we can install Mechanize. I see that i run sometimes into serious problems. - See the make issues(below) that i often run into!

    Keath: I heard about this package: Task::Mechanistic::Firefox wihch contains lots of stuff that is needed.

    see detailed inof at the CPAN-Page: Task::Mechanistic::FireFox

    Khen, the guy that put together all this told this - since there are loads of dependencies that need to be installed before we can install Mechanize. Sure, CPAN does exactly what it is told to do. The authors of the dependencies are supposed to to tell it to install prerequisites: however, apparently they don't always do that, so some dependencies end up in the wind, causing the problems that we are encountering.

    So keath, what d o you think, should we give this package a try!? CPAN-Module: Task-Mechanistic-Firefox-0.01/lib/Task/Mechanistic/Firefox.pm it is created by Khen1950fx@aol.com


    regrading the Make-Test: this is a difficult issue i run several times into - e.g. here i also had a bad make-test too:

    see this thread here

    Code:
    Can't exec "make": No such file or directory at /usr/lib/perl5/5.12.1/CPAN/Distribution.pm line 2026.
    MIROD/HTML-TreeBuilder-XPath-0.11.tar.gz
    make -- NOT OK
    Running make test
    You - keath answered: Seems to me that once a make fails in CPAN, it gets stubborn about trying to make again. I'm concerned about the earlier errors though, since it said you didn't have the prerequesites installed. Try telling cpan to initialize again. Login to the shell, and send the command:

    Code:
    o conf init
    You can accept defaults for most things, but when you get to the prerequisites line, choose "follow"
    You are still failing to build the prerequisites. You can do that manually, or you can check the cpan configuration again. At the cpan prompt, type 'o conf' and look at how it is set up. This is the option you are looking for:

    Code:
    prerequisites_policy [follow]
    And on a sidenote: a guy told me to take care with the installation.
    He pointed out that the bad make-test can be caused by an installation for only one user - and not the whole system

    see this thread here

    Code:
    t/mechanize/content.t  (Wstat: 512 Tests: 0 Failed: 0)
      Non-zero exit status: 2
      Parse errors: No plan found in TAP output
    t/rt65615.t                     (Wstat: 512 Tests: 0 Failed: 0)
      Non-zero exit status: 2
      Parse errors: No plan found in TAP output
    t/select.t                      (Wstat: 512 Tests: 0 Failed: 0)
      Non-zero exit status: 2
      Parse errors: No plan found in TAP output
    Files=72, Tests=59,  5 wallclock secs ( 0.25 usr  0.10 sys +  4.08 cusr  0.62 csys =  5.05 CPU)
    Result: FAIL
    Failed 67/72 test programs. 13/59 subtests failed.
    make: *** [test_dynamic] Fehler 2
      CORION/WWW-Mechanize-Firefox-0.58.tar.gz
    one dependency not OK (MozRepl::RemoteObject); additionally test harness failed
      /usr/bin/make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
      reports CORION/WWW-Mechanize-Firefox-0.58.tar.gz
    Running make install
      make test had returned bad status, won't install without force
    linux-wyee:/home/martin/perl #
    Daxim, a user of Stackoverflow answered this: This happens when MozRepl::RemoteObject cannot be loaded. Install MozRepl for the system, not your user only.

    What do you think - is it possible that i run into problems since i do a messed up installation - with parts of it

    - installed as superuser [root], and other parts of it
    - installed as user [martin]

    what do you tink - is this possible. Can this be a cause of the issues i am faced!?



    As noted above, this is only a short answer since i am not at home right now. i am in the office - I get home later the evening then i can continue the work on the notebook with Perl, then i will do all you adviced me!

    Then i will try to install Template::Toolkit


    Again, many many thanks for the help in this sophisticated task!

    regards
    Metabo
    Last edited by metabo; May 17th, 2013 at 11:38 AM.
  16. #24
  17. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,971
    Rep Power
    1225
    Since you're doing this on your own system, ALWAYS login as root (or su - root) when installing modules. That will solve most (if not all) of the install problems related to user rights.

    Installing with non root privileges adds a couple complications which you don't need or want.
  18. #25
  19. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    I'm not sure if you were asking me or quoting me, but yes, I agree that once CPAN fails a make, it is often difficult to get beyond that. That is why I recommended you download and build MozRepl manually. You should concentrate on those errors before doing anything else.

    I also had trouble with the prerequisites for WWW-Mechanize-Firefox. I didn't on an earlier build, but it is possible the current package just doesn't specify everything necessary.

    But that is a very easy problem to work around. You just make note of any message which says "Can't locate <module> in @INC", and you install that module by name.

    ---

    I wouldn't try the other package, Task::Mechanistic::Firefox, yet. I'm not familiar with it, but I believe it is possible for you to get past the trouble with this installation.

    Yes, you should probably install modules consistently. I always install as the root user (sudo) because it is my machine, and I want the modules to also be available which I'm running as a web account or database user also.

    If it is not your machine, you may install only to a single user, but be aware that it may be a problem if you want a script to be available from a web server later.
  20. #26
  21. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,971
    Rep Power
    1225
    I agree that once CPAN fails a make, it is often difficult to get beyond that. That is why I recommended you download and build MozRepl manually.
    If the manual build fails, you still have the same cleanup issues as you would have from a failed cpan install before you reattempt the install.
  22. #27
  23. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    Originally Posted by FishMonger
    If the manual build fails, you still have the same cleanup issues as you would have from a failed cpan install before you reattempt the install.
    'make clean' seems a lot more straight-forward to me than trying the same in CPAN. That's been my experience.
  24. #28
  25. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,971
    Rep Power
    1225
    Originally Posted by keath
    'make clean' seems a lot more straight-forward to me than trying the same in CPAN. That's been my experience.
    failed install
    cpan[2]> install MozRepl
    Running install for module 'MozRepl'
    Running make for Z/ZI/ZIGOROU/MozRepl-0.06.tar.gz
    Checksum for /home/rkb/.cpan/sources/authors/id/Z/ZI/ZIGOROU/MozRepl-0.06.tar.gz ok
    Scanning cache /home/rkb/.cpan/build for sizes
    ................................--------------------------------------------DONE

    ....
    ...
    Running make install
    make test had returned bad status, won't install without force
    Failed during this command:
    ZIGOROU/MozRepl-0.06.tar.gz : make_test NO
    now let's clean up
    Code:
    cpan[3]> clean MozRepl   
    Running clean for module 'MozRepl'
    Running make clean
    rm -f \
              *.a core \
              core.[0-9] blib/arch/auto/MozRepl/extralibs.all \
              core.[0-9][0-9] MozRepl.bso \
              pm_to_blib.ts MYMETA.json \
              core.[0-9][0-9][0-9][0-9] MYMETA.yml \
              MozRepl.x  \
              perl tmon.out \
              *.o pm_to_blib \
              blib/arch/auto/MozRepl/extralibs.ld blibdirs.ts \
              core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
              core.*perl.*.? Makefile.aperl \
              MozRepl.def perl \
              core.[0-9][0-9][0-9] mon.out \
              libMozRepl.def perlmain.c \
              perl.exe so_locations \
              MozRepl.exp 
    rm -rf \
              blib 
    mv Makefile Makefile.old > /dev/null 2>&1
      ZIGOROU/MozRepl-0.06.tar.gz
      /usr/bin/make clean -- OK
    Seems pretty easiy and straight-forward to me.

    Comments on this post

    • keath agrees : I don't use the shell much, but I agree that is very easy. Thanks!
  26. #29
  27. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    339
    Rep Power
    0

    Task-Mechanistic-Firefox now running on port localhost:52074 - doable?


    hello dear fishmonger hello dear keath


    thx for the reply - and the hints - i gave the task-mechanistic-firefox a try

    i tried to install Task-Mechanistic-Firefox-0.01.tar.gz


    unfortunalty without generating a report for all the processes

    but let me tell you - some investigations
    during the tests sevral new brwoser windows were opened - with text in it like so...

    Mechanize ::Firefox etc ....

    see a snippet of the report here

    http://pastebin.com/G9XJNXsG

    see a snippet of the report...

    Code:
    
    # Checking basic functionality and how your ptys handle large strings...
    #   This test may hang on certain systems, even though it is protected
    #   by alarm().  If the counter stops, try Ctrl-C, the test should continue.
    trying posix_openpt()...
    trying grantpt()...
    trying unlockpt()...
    trying ptsname_r()...
    trying to open /dev/pts/2...
    trying to I_PUSH ptem...
    trying to I_PUSH ldterm...
    trying to I_PUSH ttcompat...
    # isatty($master): YES
    # isatty($slave): YES
    # Child PID = 10644
    # Good, your raw ptys can handle at least 530 bytes at once.
    t/test.t .. 5/5 sysread(): Eingabe-/Ausgabefehler at t/test.t line 151.
    Slave got EOF at line 530, byte 0.
    t/test.t .. ok   
    All tests successful.
    Files=1, Tests=5,  4 wallclock secs ( 0.04 usr  0.02 sys +  0.32 cusr  0.46 csys =  0.84 CPU)
    Result: PASS
      TODDR/IO-Tty-1.10.tar.gz
      /usr/bin/make test -- OK
    Running make install
    Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
    Installing /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi/auto/IO/Tty/Tty.so
    Installing /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi/auto/IO/Tty/Tty.bs
    Installing /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi/IO/Pty.pm
    Installing /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi/IO/Tty.pm
    Installing /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi/IO/Tty/Constant.pm
    Installing /usr/share/man/man3/IO::Pty.3pm
    Installing /usr/share/man/man3/IO::Tty::Constant.3pm
    Installing /usr/share/man/man3/IO::Tty.3pm
    Appending installation info to /usr/lib/perl5/5.16.2/i586-linux-thread-multi/perllocal.pod
      TODDR/IO-Tty-1.10.tar.gz
      /usr/bin/make install  -- OK
    Running make for S/SK/SKI/Task-Mechanistic-Firefox-0.01.tar.gz
      Has already been unwrapped into directory /root/.cpan/build/Task-Mechanistic-Firefox-0.01-_ECpVJ
    
      CPAN.pm: Building S/SK/SKI/Task-Mechanistic-Firefox-0.01.tar.gz
    
    cp lib/Task/Mechanistic/Firefox.pm blib/lib/Task/Mechanistic/Firefox.pm
    Manifying blib/man3/Task::Mechanistic::Firefox.3pm
      SKI/Task-Mechanistic-Firefox-0.01.tar.gz
      /usr/bin/make -- OK
    Running make test
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/Task-Mechanistic-Firefox.t
    t/Task-Mechanistic-Firefox.t .. ok   
    All tests successful.
    Files=1, Tests=1,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.01 cusr  0.00 csys =  0.05 CPU)
    Result: PASS
      SKI/Task-Mechanistic-Firefox-0.01.tar.gz
      /usr/bin/make test -- OK
    Running make install
    Installing /usr/lib/perl5/site_perl/5.16.2/Task/Mechanistic/Firefox.pm
    Installing /usr/share/man/man3/Task::Mechanistic::Firefox.3pm
    Appending installation info to /usr/lib/perl5/5.16.2/i586-linux-thread-multi/perllocal.pod
      SKI/Task-Mechanistic-Firefox-0.01.tar.gz
      /usr/bin/make install  -- OK
    Failed during this command:
     ZIGOROU/MozRepl-0.06.tar.gz                  : make_test FAILED but failure ignored because 'force' in effect
     MIKEM/Net-SSLeay-1.54.tar.gz                 : make NO
     SULLR/IO-Socket-SSL-1.89.tar.gz              : make_test FAILED but failure ignored because 'force' in effect
     GAAS/LWP-Protocol-https-6.04.tar.gz          : make_test FAILED but failure ignored because 'force' in effect
     NANIS/Crypt-SSLeay-0.64.tar.gz               : make NO
     SKI/Task-Mechanistic-0.01.tar.gz             : make_test FAILED but failure ignored because 'force' in effect
     CORION/WWW-Mechanize-Firefox-0.74.tar.gz     : make_test FAILED but failure ignored because 'force' in effect

    and see some content of a browser-window that opened... - and this was a brand new behaviour. i never ever had this during an attemt of installation of Mechanize::FireFox
    in the last 15 month

    yes i tried this more than 15 month now... - on several platforms.

    see this...utput of a firefox-browser.window:

    Code:
    Request headers
    
    Connection: keep-alive
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding: gzip, deflate
    Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
    Host: localhost:52074
    User-Agent: Mozilla/5.0 (X11; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0
    Cookie: log-server-httponly=supersecret; log-server=shazam2
    by the way - do i have to switch something with the Host - shouldent it be something with 4xxyy

    question -. how can i test if the installation-process succedet?

    love to hear from you

    regards
    metabo




    update - GUESS IT WORKS NOW....



    see the test -. keath i run the testcode

    Code:
    #!/usr/bin/perl
    use strict;
    use warnings;
    
    use WWW::Mechanize::Firefox;
    
    my @urls = qw(
    	http://www.google.com
    	http://www.yahoo.com
    	http://www.cnn.com
    	http://www.bing.com
    	http://www.nbcnews.com
    );
    
    my $temp = '/tmp';
    my $mech = WWW::Mechanize::Firefox->new('create');
    
    foreach my $url (@urls){
    	my ($name) = $url =~ /www\.(\w+)\.com/;
    	print "creating $name.png\n";
    	 
    	$mech->get($url);
    	sleep(5);
    	my $png = $mech->content_as_png(undef, undef, {width => 240, height => 240});
    	
    	my $file = "$temp/$name".".png";
    	open my $fh, ">", $file or die "couldnt create $file";
    	binmode $fh;
    	print $fh $png;
    	close $fh;
    }
    
    print "done\n";
    it gives the following output in the terminal



    Code:
    martin@linux-70ce:~> cd perl
    martin@linux-70ce:~/perl> ls
    mech1.pl  mech2  mech2.pl  mech3.pl
    martin@linux-70ce:~/perl> perl mech3.pl
    creating google.png
    creating yahoo.png
    creating cnn.png
    creating bing.png
    creating nbcnews.png
    done
    martin@linux-70ce:~/perl> ^C
    martin@linux-70ce:~/perl>
    hmmm - well i think that these images that were created just need to be stored somehwhere - but apparently not in the same folder...

    where are they stored?

    love to hear from you
    greets
    metabo
    Last edited by metabo; May 17th, 2013 at 08:54 PM.
  28. #30
  29. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    Code:
    my $temp = '/tmp';
    ...
    my $file = "$temp/$name".".png";
    I just wrote them to the /tmp directory, at the root level of the drive. If you reboot, they'll be gone, but it's a place any process can write to regardless of user.

    Change the directory to whatever location you want.

IMN logo majestic logo threadwatch logo seochat tools logo