good day dear folks first of all; i run linux opensuse 11.4 i try to run this little programme on a linux box.
PHP Code: #!/usr/bin/perl 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;
prerequisites: i have a collection of ursl - stored in urls.txt i have installed mechanize and WWW::Mechanize::Firefox If i run the script i get fatal errors -
linux-vi17:/home/martin/bin # perl get_shots.pl Failed to connect to , problem connecting to "localhost", port 4242: connecting to the denied at /usr/lib/perl5/site_perl/5.12.3/MozRepl/Cl +ient.pm line 144
but wait - i also have installed the mozlRepl ....
K Running make test /usr/bin/perl "-Iinc" Makefile.PL --config= --installdeps=Class::A +ccessor::Fast,0,Module::Pluggable::Fast,0,Template,0,Template::Provid +er::FromDAT A,0,UNIVERSAL::require,0 PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "te +st_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00-load.t t/10-plugi +n-repl-enter.t t/11-plugin-repl-search.t t/12-plugin-repl-inspect.t t +/13-plugin-repl-load.t t/14-plugin-repl-rename.t t/15-plugin-repl-pri +nt.t t/16-plugin-repl-home.t t/17-plugin-repl-back.t t/18-plugin-repl +-util-help_url_for.t t/19-plugin-repl-util-doc_for.t t/20-plugin-json +.t t/pod-coverage.t t/pod.t t/00-load.t ........................... 1/3 # Testing MozRepl 0.06 t/00-load.t ........................... ok t/10-plugin-repl-enter.t .............. [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/10-plugin-repl-enter.t .............. ok t/11-plugin-repl-search.t ............. [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/11-plugin-repl-search.t ............. ok t/12-plugin-repl-inspect.t ............ [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/12-plugin-repl-inspect.t ............ ok t/13-plugin-repl-load.t ............... [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/13-plugin-repl-load.t ............... ok t/14-plugin-repl-rename.t ............. [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/14-plugin-repl-rename.t ............. ok t/15-plugin-repl-print.t .............. [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/15-plugin-repl-print.t .............. ok t/16-plugin-repl-home.t ............... [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/16-plugin-repl-home.t ............... ok t/17-plugin-repl-back.t ............... [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/17-plugin-repl-back.t ............... ok t/18-plugin-repl-util-help_url_for.t .. [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/18-plugin-repl-util-help_url_for.t .. ok t/19-plugin-repl-util-doc_for.t ....... [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/19-plugin-repl-util-doc_for.t ....... ok t/20-plugin-json.t .................... [DEBUG] MozRepl logging en +abled [DEBUG] ---- Client arguments ---- .----------------------+------------------------------------------ +. | client_arg_name | client_arg_value +| +----------------------+------------------------------------------ ++ | host | localhost +| | port | 4242 +| | timeout | 10 +| | extra_client_args | {} +| '----------------------+------------------------------------------ +' t/20-plugin-json.t .................... ok t/pod-coverage.t ...................... skipped: Test::Pod::Covera +ge 1.04 required for testing POD coverage t/pod.t ............................... skipped: Test::Pod 1.14 re +quired for testing POD All tests successful. Files=14, Tests=42, 7 wallclock secs ( 0.14 usr 0.08 sys + 2.98 + cusr 0.36 csys = 3.56 CPU) Result: PASS ZIGOROU/MozRepl-0.06.tar.gz make test -- OK Running make install /usr/bin/perl "-Iinc" Makefile.PL --config= --installdeps=Class::A +ccessor::Fast,0,Module::Pluggable::Fast,0,Template,0,Template::Provid +er::FromDAT A,0,UNIVERSAL::require,0 Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Log.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Client.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Util.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Base.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/JSON.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Sea +rch.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Loa +d.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Ren +ame.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Ins +pect.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Hom +e.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Ent +er.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Pri +nt.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Bac +k.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Uti +l/DocFor.pm Installing /usr/lib/perl5/site_perl/5.12.3/MozRepl/Plugin/Repl/Uti +l/HelpUrlFor.pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Util::DocFor +.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Print.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Inspect.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Back.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Rename.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Util::HelpUr +lFor.3pm Installing /usr/share/man/man3/MozRepl::Client.3pm Installing /usr/share/man/man3/MozRepl::Plugin::JSON.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Base.3pm Installing /usr/share/man/man3/MozRepl::Log.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Load.3pm Installing /usr/share/man/man3/MozRepl::Util.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Home.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Search.3pm Installing /usr/share/man/man3/MozRepl::Plugin::Repl::Enter.3pm Installing /usr/share/man/man3/MozRepl.3pm Appending installation info to /usr/lib/perl5/5.12.3/i586-linux-th +read-multi/perllocal.pod ZIGOROU/MozRepl-0.06.tar.gz make install -- OK
plz let me know what goes wrong here... !? Do not let me out in the dark

In reply to Perl Mechanize runs into error: couldn t connect to localhost - port 4242 [so i never have this strange error] by Perlbeginner1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.