$mech->repl->repl->timeout(100000);
Unfortunatly it does not work:
Can't locate object method "timeout" via package "MozRepl"

Documentation says this should:
$mech->repl->repl->setup_client( { extra_client_args => { timeout => 1 +80 } } );

But after this statement $mech->get() raises an error:
MozRepl::RemoteObject: TypeError: repl.breakLink is not a function
But I wonder - WWW::Mechanize::Firefox polls for results from Firefox, so there should be no timeout even if a website is slow to respond. The main cause I know for getting timeout errors is when I send invalid Javascript code over to Firefox.
Last commands before timeout which I can see with strace:
write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 999993} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\n", 4096) = 38 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 964561} +) read(3, "repl> ", 4096) = 6 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997753} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997763} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 998085} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997690} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\n", 4096) = 38 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 960641} +) read(3, "repl> ", 4096) = 6 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997790} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997765} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997764} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997768} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 999993} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997789} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999992 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 996842} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\nrepl> ", 4096) + = 44 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 997698} +) read(3, "\"{\"result\":{\"result\":0,\"type\":null}}\"\n", 4096) = 38 select(8, [3], NULL, NULL, {11, 0}) = 1 (in [3], left {10, 960724} +) read(3, "repl> ", 4096) = 6 select(8, NULL, [3], NULL, {11, 0}) = 1 (out [3], left {10, 999993 +}) write(3, "JSON.stringify( function(){ var res = repl.getAttr(17,\"busy +\")\n; return { result: res }}())\n", 91) = 91 select(8, [3], NULL, NULL, {11, 0}) = 0 (Timeout) write(2, "command timed-out at /usr/local/share/perl/5.10.1/MozRepl/Cl +ient.pm line 186\n", 77) = 77

In reply to Re^2: WWW::Mechanize::Firefox and Net::Telnet timeout by OlegG
in thread WWW::Mechanize::Firefox and Net::Telnet timeout by OlegG

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.