{
    "mode": "info",
    "parameter": "WWW::Mechanize",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/WWW%3A%3AMechanize/json",
    "generated": "2026-07-06T19:41:25Z",
    "synopsis": "WWW::Mechanize supports performing a sequence of page fetches including\nfollowing links and submitting forms. Each fetched page is parsed and\nits links and forms are extracted. A link or a form can be selected,\nform fields can be filled and the next page can be fetched.  Mech also\nstores a history of the URLs you've visited, which can be queried and\nrevisited.\nuse WWW::Mechanize ();\nmy $mech = WWW::Mechanize->new();\n$mech->get( $url );\n$mech->followlink( n => 3 );\n$mech->followlink( textregex => qr/download this/i );\n$mech->followlink( url => 'http://host.com/index.html' );\n$mech->submitform(\nformnumber => 3,\nfields      => {\nusername    => 'mungo',\npassword    => 'lost-and-alone',\n}\n);\n$mech->submitform(\nformname => 'search',\nfields    => { query  => 'pot of gold', },\nbutton    => 'Search Now'\n);\n# Enable strict form processing to catch typos and non-existant form fields.\nmy $strictmech = WWW::Mechanize->new( strictforms => 1);\n$strictmech->get( $url );\n# This method call will die, saving you lots of time looking for the bug.\n$strictmech->submitform(\nformnumber => 3,\nfields      => {\nusernaem     => 'mungo',           # typo in field name\npassword     => 'lost-and-alone',\nextrafield  => 123,               # field does not exist\n}\n);",
    "sections": {
        "NAME": {
            "content": "WWW::Mechanize - Handy web browsing in a Perl object\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.06\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "WWW::Mechanize supports performing a sequence of page fetches including\nfollowing links and submitting forms. Each fetched page is parsed and\nits links and forms are extracted. A link or a form can be selected,\nform fields can be filled and the next page can be fetched.  Mech also\nstores a history of the URLs you've visited, which can be queried and\nrevisited.\n\nuse WWW::Mechanize ();\nmy $mech = WWW::Mechanize->new();\n\n$mech->get( $url );\n\n$mech->followlink( n => 3 );\n$mech->followlink( textregex => qr/download this/i );\n$mech->followlink( url => 'http://host.com/index.html' );\n\n$mech->submitform(\nformnumber => 3,\nfields      => {\nusername    => 'mungo',\npassword    => 'lost-and-alone',\n}\n);\n\n$mech->submitform(\nformname => 'search',\nfields    => { query  => 'pot of gold', },\nbutton    => 'Search Now'\n);\n\n# Enable strict form processing to catch typos and non-existant form fields.\nmy $strictmech = WWW::Mechanize->new( strictforms => 1);\n\n$strictmech->get( $url );\n\n# This method call will die, saving you lots of time looking for the bug.\n$strictmech->submitform(\nformnumber => 3,\nfields      => {\nusernaem     => 'mungo',           # typo in field name\npassword     => 'lost-and-alone',\nextrafield  => 123,               # field does not exist\n}\n);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"WWW::Mechanize\", or Mech for short, is a Perl module for stateful\nprogrammatic web browsing, used for automating interaction with\nwebsites.\n\nFeatures include:\n\no   All HTTP methods\n\no   High-level hyperlink and HTML form support, without having to parse\nHTML yourself\n\no   SSL support\n\no   Automatic cookies\n\no   Custom HTTP headers\n\no   Automatic handling of redirections\n\no   Proxies\n\no   HTTP authentication\n\nMech is well suited for use in testing web applications.  If you use\none of the Test::*, like Test::HTML::Lint modules, you can check the\nfetched content and use that as input to a test call.\n\nuse Test::More;\nlike( $mech->content(), qr/$expected/, \"Got expected content\" );\n\nEach page fetch stores its URL in a history stack which you can\ntraverse.\n\n$mech->back();\n\nIf you want finer control over your page fetching, you can use these\nmethods. \"followlink\" and \"submitform\" are just high level wrappers\naround them.\n\n$mech->findlink( n => $number );\n$mech->formnumber( $number );\n$mech->formname( $name );\n$mech->field( $name, $value );\n$mech->setfields( %fieldvalues );\n$mech->setvisible( @criteria );\n$mech->click( $button );\n\nWWW::Mechanize is a proper subclass of LWP::UserAgent and you can also\nuse any of LWP::UserAgent's methods.\n\n$mech->addheader($name => $value);\n\nPlease note that Mech does NOT support JavaScript, you need additional\nsoftware for that. Please check \"JavaScript\" in WWW::Mechanize::FAQ for\nmore.\n",
            "subsections": []
        },
        "IMPORTANT LINKS": {
            "content": "o   <https://github.com/libwww-perl/WWW-Mechanize/issues>\n\nThe queue for bugs & enhancements in WWW::Mechanize.  Please note\nthat the queue at <http://rt.cpan.org> is no longer maintained.\n\no   <https://metacpan.org/pod/WWW::Mechanize>\n\nThe CPAN documentation page for Mechanize.\n\no   <https://metacpan.org/pod/distribution/WWW-Mechanize/lib/WWW/Mechanize/FAQ.pod>\n\nFrequently asked questions.  Make sure you read here FIRST.\n",
            "subsections": []
        },
        "CONSTRUCTOR AND STARTUP": {
            "content": "new()\nCreates and returns a new WWW::Mechanize object, hereafter referred to\nas the \"agent\".\n\nmy $mech = WWW::Mechanize->new()\n\nThe constructor for WWW::Mechanize overrides two of the params to the\nLWP::UserAgent constructor:\n\nagent => 'WWW-Mechanize/#.##'\ncookiejar => {}    # an empty, memory-only HTTP::Cookies object\n\nYou can override these overrides by passing params to the constructor,\nas in:\n\nmy $mech = WWW::Mechanize->new( agent => 'wonderbot 1.01' );\n\nIf you want none of the overhead of a cookie jar, or don't want your\nbot accepting cookies, you have to explicitly disallow it, like so:\n\nmy $mech = WWW::Mechanize->new( cookiejar => undef );\n\nHere are the params that WWW::Mechanize recognizes.  These do not\ninclude params that LWP::UserAgent recognizes.\n\no   \"autocheck => [0|1]\"\n\nChecks each request made to see if it was successful.  This saves\nyou the trouble of manually checking yourself.  Any errors found\nare errors, not warnings.\n\nThe default value is ON, unless it's being subclassed, in which\ncase it is OFF.  This means that standalone WWW::Mechanize\ninstances have autocheck turned on, which is protective for the\nvast majority of Mech users who don't bother checking the return\nvalue of get() and post() and can't figure why their code fails.\nHowever, if WWW::Mechanize is subclassed, such as for\nTest::WWW::Mechanize or Test::WWW::Mechanize::Catalyst, this may\nnot be an appropriate default, so it's off.\n\no   \"noproxy => [0|1]\"\n\nTurn off the automatic call to the LWP::UserAgent \"envproxy\"\nfunction.\n\nThis needs to be explicitly turned off if you're using\nCrypt::SSLeay to access a https site via a proxy server.  Note: you\nstill need to set your HTTPSPROXY environment variable as\nappropriate.\n\no   \"onwarn => \\&func\"\n\nReference to a \"warn\"-compatible function, such as \"Carp::carp\",\nthat is called when a warning needs to be shown.\n\nIf this is set to \"undef\", no warnings will ever be shown.\nHowever, it's probably better to use the \"quiet\" method to control\nthat behavior.\n\nIf this value is not passed, Mech uses \"Carp::carp\" if Carp is\ninstalled, or \"CORE::warn\" if not.\n\no   \"onerror => \\&func\"\n\nReference to a \"die\"-compatible function, such as \"Carp::croak\",\nthat is called when there's a fatal error.\n\nIf this is set to \"undef\", no errors will ever be shown.\n\nIf this value is not passed, Mech uses \"Carp::croak\" if Carp is\ninstalled, or \"CORE::die\" if not.\n\no   \"quiet => [0|1]\"\n\nDon't complain on warnings.  Setting \"quiet => 1\" is the same as\ncalling \"$mech->quiet(1)\".  Default is off.\n\no   \"stackdepth => $value\"\n\nSets the depth of the page stack that keeps track of all the\ndownloaded pages. Default is effectively infinite stack size.  If\nthe stack is eating up your memory, then set this to a smaller\nnumber, say 5 or 10.  Setting this to zero means Mech will keep no\nhistory.\n\nIn addition, WWW::Mechanize also allows you to globally enable strict\nand verbose mode for form handling, which is done with HTML::Form.\n\no   \"strictforms => [0|1]\"\n\nGlobally sets the HTML::Form strict flag which causes form\nsubmission to croak if any of the passed fields don't exist in the\nform, and/or a value doesn't exist in a select element. This can\nstill be disabled in individual calls to \"submitform()\".\n\nDefault is off.\n\no   \"verboseforms => [0|1]\"\n\nGlobally sets the HTML::Form verbose flag which causes form\nsubmission to warn about any bad HTML form constructs found. This\ncannot be disabled later.\n\nDefault is off.\n\no   \"markedsections => [0|1]\"\n\nGlobally sets the HTML::Parser marked sections flag which causes\nHTML \"CDATA[[\" sections to be honoured. This cannot be disabled\nlater.\n\nDefault is on.\n\nTo support forms, WWW::Mechanize's constructor pushes POST on to the\nagent's \"requestsredirectable\" list (see also LWP::UserAgent.)\n\n$mech->agentalias( $alias )\nSets the user agent string to the expanded version from a table of\nactual user strings.  $alias can be one of the following:\n\no   Windows IE 6\n\no   Windows Mozilla\n\no   Mac Safari\n\no   Mac Mozilla\n\no   Linux Mozilla\n\no   Linux Konqueror\n\nthen it will be replaced with a more interesting one.  For instance,\n\n$mech->agentalias( 'Windows IE 6' );\n\nsets your User-Agent to\n\nMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\n\nThe list of valid aliases can be returned from \"knownagentaliases()\".\nThe current list is:\n\no   Windows IE 6\n\no   Windows Mozilla\n\no   Mac Safari\n\no   Mac Mozilla\n\no   Linux Mozilla\n\no   Linux Konqueror\n\nknownagentaliases()\nReturns a list of all the agent aliases that Mech knows about.\n",
            "subsections": []
        },
        "PAGE-FETCHING METHODS": {
            "content": "$mech->get( $uri )\nGiven a URL/URI, fetches it.  Returns an HTTP::Response object.  $uri\ncan be a well-formed URL string, a URI object, or a\nWWW::Mechanize::Link object.\n\nThe results are stored internally in the agent object, but you don't\nknow that.  Just use the accessors listed below.  Poking at the\ninternals is deprecated and subject to change in the future.\n\n\"get()\" is a well-behaved overloaded version of the method in\nLWP::UserAgent.  This lets you do things like\n\n$mech->get( $uri, ':contentfile' => $filename );\n\nand you can rest assured that the params will get filtered down\nappropriately. See \"get\" in LWP::UserAgent for more details.\n\nNOTE: Because \":contentfile\" causes the page contents to be stored in\na file instead of the response object, some Mech functions that expect\nit to be there won't work as expected. Use with caution.\n\nHere is a non-complete list of methods that do not work as expected\nwith \":contentfile\": \" forms() \", \" currentform() \", \" links() \", \"\ntitle() \", \" content(...) \", \" text() \", all content-handling methods,\nall link methods, all image methods, all form methods, all field\nmethods, \" savecontent(...) \", \" dumplinks(...) \", \" dumpimages(...)\n\", \" dumpforms(...) \", \" dumptext(...) \"\n\n$mech->post( $uri, content => $content )\nPOSTs $content to $uri.  Returns an HTTP::Response object.  $uri can be\na well-formed URI string, a URI object, or a WWW::Mechanize::Link\nobject.\n\n$mech->put( $uri, content => $content )\nPUTs $content to $uri.  Returns an HTTP::Response object.  $uri can be\na well-formed URI string, a URI object, or a WWW::Mechanize::Link\nobject.\n\nmy $res = $mech->head( $uri );\nmy $res = $mech->head( $uri , $fieldname => $value, ... );\n\n$mech->head ($uri )\nPerforms a HEAD request to $uri. Returns an HTTP::Response object.\n$uri can be a well-formed URI string, a URI object, or a\nWWW::Mechanize::Link object.\n\n$mech->reload()\nActs like the reload button in a browser: repeats the current request.\nThe history (as per the back() method) is not altered.\n\nReturns the HTTP::Response object from the reload, or \"undef\" if\nthere's no current request.\n\n$mech->back()\nThe equivalent of hitting the \"back\" button in a browser.  Returns to\nthe previous page.  Won't go back past the first page. (Really, what\nwould it do if it could?)\n\nReturns true if it could go back, or false if not.\n\n$mech->clearhistory()\nThis deletes all the history entries and returns true.\n\n$mech->historycount()\nThis returns the number of items in the browser history.  This number\ndoes include the most recently made request.\n\n$mech->history($n)\nThis returns the nth item in history.  The 0th item is the most recent\nrequest and response, which would be acted on by methods like\n\"findlink()\".  The 1st item is the state you'd return to if you called\n\"back()\".\n\nThe maximum useful value for $n is \"$mech->historycount - 1\".\nRequests beyond that bound will return \"undef\".\n\nHistory items are returned as hash references, in the form:\n\n{ req => $httprequest, res => $httpresponse }\n",
            "subsections": []
        },
        "STATUS METHODS": {
            "content": "$mech->success()\nReturns a boolean telling whether the last request was successful.  If\nthere hasn't been an operation yet, returns false.\n\nThis is a convenience function that wraps \"$mech->res->issuccess\".\n\n$mech->uri()\nReturns the current URI as a URI object. This object stringifies to the\nURI itself.\n\n$mech->response() / $mech->res()\nReturn the current response as an HTTP::Response object.\n\nSynonym for \"$mech->response()\"\n\n$mech->status()\nReturns the HTTP status code of the response.  This is a 3-digit number\nlike 200 for OK, 404 for not found, and so on.\n\n$mech->ct() / $mech->contenttype()\nReturns the content type of the response.\n\n$mech->base()\nReturns the base URI for the current response\n\n$mech->forms()\nWhen called in a list context, returns a list of the forms found in the\nlast fetched page. In a scalar context, returns a reference to an array\nwith those forms. The forms returned are all HTML::Form objects.\n\n$mech->currentform()\nReturns the current form as an HTML::Form object.\n\n$mech->links()\nWhen called in a list context, returns a list of the links found in the\nlast fetched page.  In a scalar context it returns a reference to an\narray with those links.  Each link is a WWW::Mechanize::Link object.\n\n$mech->ishtml()\nReturns true/false on whether our content is HTML, according to the\nHTTP headers.\n\n$mech->title()\nReturns the contents of the \"<TITLE>\" tag, as parsed by\nHTML::HeadParser.  Returns undef if the content is not HTML.\n\n$mech->redirects()\nConvenience method to get the redirects from the most recent\nHTTP::Response.\n\nNote that you can also use isredirect to see if the most recent\nresponse was a redirect like this.\n\n$mech->get($url);\ndostuff() if $mech->res->isredirect;\n",
            "subsections": []
        },
        "CONTENT-HANDLING METHODS": {
            "content": "$mech->content(...)\nReturns the content that the mech uses internally for the last page\nfetched. Ordinarily this is the same as\n\"$mech->response()->decodedcontent()\", but this may differ for HTML\ndocuments if updatehtml is overloaded (in which case the value passed\nto the base-class implementation of same will be returned), and/or\nextra named arguments are passed to content():\n\n$mech->content( format => 'text' )\nReturns a text-only version of the page, with all HTML markup\nstripped. This feature requires HTML::TreeBuilder version 5 or higher\nto be installed, or a fatal error will be thrown. This works only if\nthe contents are HTML.\n\n$mech->content( basehref => [$basehref|undef] )\nReturns the HTML document, modified to contain a \"<base\nhref=\"$basehref\">\" mark-up in the header.  $basehref is\n\"$mech->base()\" if not specified. This is handy to pass the HTML to\ne.g. HTML::Display. This works only if the contents are HTML.\n\n$mech->content( raw => 1 )\nReturns \"$self->response()->content()\", i.e. the raw contents from\nthe response.\n\n$mech->content( decodedbyheaders => 1 )\nReturns the content after applying all \"Content-Encoding\" headers but\nwith not additional mangling.\n\n$mech->content( charset => $charset )\nReturns \"$self->response()->decodedcontent(charset => $charset)\"\n(see HTTP::Response for details).\n\nTo preserve backwards compatibility, additional parameters will be\nignored unless none of \"raw | decodedbyheaders | charset\" is\nspecified and the text is HTML, in which case an error will be\ntriggered.\n\nA fresh instance of WWW::Mechanize will return \"undef\" when\n\"$mech->content()\" is called, because no content is present before a\nrequest has been made.\n\n$mech->text()\nReturns the text of the current HTML content.  If the content isn't\nHTML, $mech will die.\n\nThe text is extracted by parsing the content, and then the extracted\ntext is cached, so don't worry about performance of calling this\nrepeatedly.\n",
            "subsections": []
        },
        "LINK METHODS": {
            "content": "$mech->links()\nLists all the links on the current page.  Each link is a\nWWW::Mechanize::Link object. In list context, returns a list of all\nlinks.  In scalar context, returns an array reference of all links.\n\n$mech->followlink(...)\nFollows a specified link on the page.  You specify the match to be\nfound using the same params that \"findlink()\" uses.\n\nHere some examples:\n\no   3rd link called \"download\"\n\n$mech->followlink( text => 'download', n => 3 );\n\no   first link where the URL has \"download\" in it, regardless of case:\n\n$mech->followlink( urlregex => qr/download/i );\n\nor\n\n$mech->followlink( urlregex => qr/(?i:download)/ );\n\no   3rd link on the page\n\n$mech->followlink( n => 3 );\n\no   the link with the url\n\n$mech->followlink( url => '/other/page' );\n\nor\n\n$mech->followlink( url => 'http://example.com/page' );\n\nReturns the result of the \"GET\" method (an HTTP::Response object) if a\nlink was found.\n\nIf the page has no links, or the specified link couldn't be found,\nreturns \"undef\".  If \"autocheck\" is enabled an exception will be thrown\ninstead.\n\n$mech->findlink( ... )\nFinds a link in the currently fetched page. It returns a\nWWW::Mechanize::Link object which describes the link.  (You'll probably\nbe most interested in the \"url()\" property.)  If it fails to find a\nlink it returns undef.\n\nYou can take the URL part and pass it to the \"get()\" method.  If that's\nyour plan, you might as well use the \"followlink()\" method directly,\nsince it does the \"get()\" for you automatically.\n\nNote that \"<FRAME SRC=\"...\">\" tags are parsed out of the HTML and\ntreated as links so this method works with them.\n\nYou can select which link to find by passing in one or more of these\nkey/value pairs:\n\no   \"text => 'string',\" and \"textregex => qr/regex/,\"\n\n\"text\" matches the text of the link against string, which must be\nan exact match.  To select a link with text that is exactly\n\"download\", use\n\n$mech->findlink( text => 'download' );\n\n\"textregex\" matches the text of the link against regex.  To select\na link with text that has \"download\" anywhere in it, regardless of\ncase, use\n\n$mech->findlink( textregex => qr/download/i );\n\nNote that the text extracted from the page's links are trimmed.\nFor example, \"<a> foo </a>\" is stored as 'foo', and searching for\nleading or trailing spaces will fail.\n\no   \"url => 'string',\" and \"urlregex => qr/regex/,\"\n\nMatches the URL of the link against string or regex, as\nappropriate.  The URL may be a relative URL, like foo/bar.html,\ndepending on how it's coded on the page.\n\no   \"urlabs => string\" and \"urlabsregex => regex\"\n\nMatches the absolute URL of the link against string or regex, as\nappropriate.  The URL will be an absolute URL, even if it's\nrelative in the page.\n\no   \"name => string\" and \"nameregex => regex\"\n\nMatches the name of the link against string or regex, as\nappropriate.\n\no   \"rel => string\" and \"relregex => regex\"\n\nMatches the rel of the link against string or regex, as\nappropriate.  This can be used to find stylesheets, favicons, or\nlinks the author of the page does not want bots to follow.\n\no   \"id => string\" and \"idregex => regex\"\n\nMatches the attribute 'id' of the link against string or regex, as\nappropriate.\n\no   \"class => string\" and \"classregex => regex\"\n\nMatches the attribute 'class' of the link against string or regex,\nas appropriate.\n\no   \"tag => string\" and \"tagregex => regex\"\n\nMatches the tag that the link came from against string or regex, as\nappropriate.  The \"tagregex\" is probably most useful to check for\nmore than one tag, as in:\n\n$mech->findlink( tagregex => qr/^(a|frame)$/ );\n\nThe tags and attributes looked at are defined below.\n\nIf \"n\" is not specified, it defaults to 1.  Therefore, if you don't\nspecify any params, this method defaults to finding the first link on\nthe page.\n\nNote that you can specify multiple text or URL parameters, which will\nbe ANDed together.  For example, to find the first link with text of\n\"News\" and with \"cnn.com\" in the URL, use:\n\n$mech->findlink( text => 'News', urlregex => qr/cnn\\.com/ );\n\nThe return value is a reference to an array containing a\nWWW::Mechanize::Link object for every link in \"$self->content\".\n\nThe links come from the following:\n\n\"<a href=...>\"\n\"<area href=...>\"\n\"<frame src=...>\"\n\"<iframe src=...>\"\n\"<link href=...>\"\n\"<meta content=...>\"\n\n$mech->findalllinks( ... )\nReturns all the links on the current page that match the criteria.  The\nmethod for specifying link criteria is the same as in \"findlink()\".\nEach of the links returned is a WWW::Mechanize::Link object.\n\nIn list context, \"findalllinks()\" returns a list of the links.\nOtherwise, it returns a reference to the list of links.\n\n\"findalllinks()\" with no parameters returns all links in the page.\n\n$mech->findallinputs( ... criteria ... )\nfindallinputs() returns an array of all the input controls in the\ncurrent form whose properties match all of the regexes passed in.  The\ncontrols returned are all descended from HTML::Form::Input.  See\n\"INPUTS\" in HTML::Form for details.\n\nIf no criteria are passed, all inputs will be returned.\n\nIf there is no current page, there is no form on the current page, or\nthere are no submit controls in the current form then the return will\nbe an empty array.\n\nYou may use a regex or a literal string:\n\n# get all textarea controls whose names begin with \"customer\"\nmy @customertextinputs = $mech->findallinputs(\ntype       => 'textarea',\nnameregex => qr/^customer/,\n);\n\n# get all text or textarea controls called \"customer\"\nmy @customertextinputs = $mech->findallinputs(\ntyperegex => qr/^(text|textarea)$/,\nname       => 'customer',\n);\n\n$mech->findallsubmits( ... criteria ... )\n\"findallsubmits()\" does the same thing as \"findallinputs()\" except\nthat it only returns controls that are submit controls, ignoring other\ntypes of input controls like text and checkboxes.\n",
            "subsections": []
        },
        "IMAGE METHODS": {
            "content": "$mech->images\nLists all the images on the current page.  Each image is a\nWWW::Mechanize::Image object. In list context, returns a list of all\nimages.  In scalar context, returns an array reference of all images.\n\n$mech->findimage()\nFinds an image in the current page. It returns a WWW::Mechanize::Image\nobject which describes the image.  If it fails to find an image it\nreturns undef.\n\nYou can select which image to find by passing in one or more of these\nkey/value pairs:\n\no   \"alt => 'string'\" and \"altregex => qr/regex/\"\n\n\"alt\" matches the ALT attribute of the image against string, which\nmust be an exact match. To select a image with an ALT tag that is\nexactly \"download\", use\n\n$mech->findimage( alt => 'download' );\n\n\"altregex\" matches the ALT attribute of the image  against a\nregular expression.  To select an image with an ALT attribute that\nhas \"download\" anywhere in it, regardless of case, use\n\n$mech->findimage( altregex => qr/download/i );\n\no   \"url => 'string'\" and \"urlregex => qr/regex/\"\n\nMatches the URL of the image against string or regex, as\nappropriate.  The URL may be a relative URL, like foo/bar.html,\ndepending on how it's coded on the page.\n\no   \"urlabs => string\" and \"urlabsregex => regex\"\n\nMatches the absolute URL of the image against string or regex, as\nappropriate.  The URL will be an absolute URL, even if it's\nrelative in the page.\n\no   \"tag => string\" and \"tagregex => regex\"\n\nMatches the tag that the image came from against string or regex,\nas appropriate.  The \"tagregex\" is probably most useful to check\nfor more than one tag, as in:\n\n$mech->findimage( tagregex => qr/^(img|input)$/ );\n\nThe tags supported are \"<img>\" and \"<input>\".\n\no   \"id => string\" and \"idregex => regex\"\n\n\"id\" matches the id attribute of the image against string, which\nmust be an exact match. To select an image with the exact id\n\"download-image\", use\n\n$mech->findimage( id => 'download-image' );\n\n\"idregex\" matches the id attribute of the image against a regular\nexpression. To select the first image with an id that contains\n\"download\" anywhere in it, use\n\n$mech->findimage( idregex => qr/download/ );\n\no   \"classs => string\" and \"classregex => regex\"\n\n\"class\" matches the class attribute of the image against string,\nwhich must be an exact match. To select an image with the exact\nclass \"img-fuid\", use\n\n$mech->findimage( class => 'img-fluid' );\n\nTo select an image with the class attribute \"rounded float-left\",\nuse\n\n$mech->findimage( class => 'rounded float-left' );\n\nNote that the classes have to be matched as a complete string, in\nthe exact order they appear in the website's source code.\n\n\"classregex\" matches the class attribute of the image against a\nregular expression. Use this if you want a partial class name, or\nif an image has several classes, but you only care about one.\n\nTo select the first image with the class \"rounded\", where there are\nmultiple images that might also have either class \"float-left\" or\n\"float-right\", use\n\n$mech->findimage( classregex => qr/\\brounded\\b/ );\n\nSelecting an image with multiple classes where you do not care\nabout the order they appear in the website's source code is not\ncurrently supported.\n\nIf \"n\" is not specified, it defaults to 1.  Therefore, if you don't\nspecify any params, this method defaults to finding the first image on\nthe page.\n\nNote that you can specify multiple ALT or URL parameters, which will be\nANDed together.  For example, to find the first image with ALT text of\n\"News\" and with \"cnn.com\" in the URL, use:\n\n$mech->findimage( image => 'News', urlregex => qr/cnn\\.com/ );\n\nThe return value is a reference to an array containing a\nWWW::Mechanize::Image object for every image in \"$self->content\".\n\n$mech->findallimages( ... )\nReturns all the images on the current page that match the criteria.\nThe method for specifying image criteria is the same as in\n\"findimage()\".  Each of the images returned is a WWW::Mechanize::Image\nobject.\n\nIn list context, \"findallimages()\" returns a list of the images.\nOtherwise, it returns a reference to the list of images.\n\n\"findallimages()\" with no parameters returns all images in the page.\n",
            "subsections": []
        },
        "FORM METHODS": {
            "content": "These methods let you work with the forms on a page.  The idea is to\nchoose a form that you'll later work with using the field methods\nbelow.\n\n$mech->forms\nLists all the forms on the current page.  Each form is an HTML::Form\nobject.  In list context, returns a list of all forms.  In scalar\ncontext, returns an array reference of all forms.\n\n$mech->formnumber($number)\nSelects the numberth form on the page as the target for subsequent\ncalls to \"field()\" and \"click()\".  Also returns the form that was\nselected.\n\nIf it is found, the form is returned as an HTML::Form object and set\ninternally for later use with Mech's form methods such as \"field()\" and\n\"click()\".  When called in a list context, the number of the found form\nis also returned as a second value.\n\nEmits a warning and returns undef if no form is found.\n\nThe first form is number 1, not zero.\n\n$mech->formname( $name )\nSelects a form by name.  If there is more than one form on the page\nwith that name, then the first one is used, and a warning is generated.\n\nIf it is found, the form is returned as an HTML::Form object and set\ninternally for later use with Mech's form methods such as \"field()\" and\n\"click()\".\n\nReturns undef if no form is found.\n\n$mech->formid( $id )\nSelects a form by ID.  If there is more than one form on the page with\nthat ID, then the first one is used, and a warning is generated.\n\nIf it is found, the form is returned as an HTML::Form object and set\ninternally for later use with Mech's form methods such as \"field()\" and\n\"click()\".\n\nIf no form is found it returns \"undef\".  This will also trigger a\nwarning, unless \"quiet\" is enabled.\n\n$mech->allformswithfields( @fields )\nSelects a form by passing in a list of field names it must contain.\nAll matching forms (perhaps none) are returned as a list of HTML::Form\nobjects.\n\n$mech->formwithfields( @fields )\nSelects a form by passing in a list of field names it must contain.  If\nthere is more than one form on the page with that matches, then the\nfirst one is used, and a warning is generated.\n\nIf it is found, the form is returned as an HTML::Form object and set\ninternally for later used with Mech's form methods such as \"field()\"\nand \"click()\".\n\nReturns undef and emits a warning if no form is found.\n\nNote that this functionality requires libwww-perl 5.69 or higher.\n\n$mech->allformswith( $attr1 => $value1, $attr2 => $value2, ... )\nSearches for forms with arbitrary attribute/value pairs within the\n<form> tag.  (Currently does not work for attribute \"action\" due to\nimplementation details of HTML::Form.)  When given more than one pair,\nall criteria must match.  Using \"undef\" as value means that the\nattribute in question must not be present.\n\nAll matching forms (perhaps none) are returned as a list of HTML::Form\nobjects.\n\n$mech->formwith( $attr1 => $value1, $attr2 => $value2, ... )\nSearches for forms with arbitrary attribute/value pairs within the\n<form> tag.  (Currently does not work for attribute \"action\" due to\nimplementation details of HTML::Form.)  When given more than one pair,\nall criteria must match.  Using \"undef\" as value means that the\nattribute in question must not be present.\n\nIf it is found, the form is returned as an HTML::Form object and set\ninternally for later used with Mech's form methods such as \"field()\"\nand \"click()\".\n\nReturns undef if no form is found.\n",
            "subsections": []
        },
        "FIELD METHODS": {
            "content": "These methods allow you to set the values of fields in a given form.\n\n$mech->field( $name, $value, $number )\n$mech->field( $name, \\@values, $number )\nGiven the name of a field, set its value to the value specified.  This\napplies to the current form (as set by the \"formname()\" or\n\"formnumber()\" method or defaulting to the first form on the page).\n\nThe optional $number parameter is used to distinguish between two\nfields with the same name.  The fields are numbered from 1.\n\n$mech->select($name, $value)\n$mech->select($name, \\@values)\nGiven the name of a \"select\" field, set its value to the value\nspecified.  If the field is not \"<select multiple>\" and the $value is\nan array, only the first value will be set.  [Note: the documentation\npreviously claimed that only the last value would be set, but this was\nincorrect.]  Passing $value as a hash with an \"n\" key selects an item\nby number (e.g.  \"{n => 3}\" or \"{n => [2,4]}\").  The numbering starts\nat 1.  This applies to the current form.\n\nIf you have a field with \"<select multiple>\" and you pass a single\n$value, then $value will be added to the list of fields selected,\nwithout clearing the others.  However, if you pass an array reference,\nthen all previously selected values will be cleared.\n\nReturns true on successfully setting the value. On failure, returns\nfalse and calls \"$self->warn()\" with an error message.\n\n$mech->setfields( $name => $value ... )\nThis method sets multiple fields of the current form. It takes a list\nof field name and value pairs. If there is more than one field with the\nsame name, the first one found is set. If you want to select which of\nthe duplicate field to set, use a value which is an anonymous array\nwhich has the field value and its number as the 2 elements.\n\n# set the second foo field\n$mech->setfields( $name => [ 'foo', 2 ] );\n\nThe fields are numbered from 1.\n\nThis applies to the current form.\n\n$mech->setvisible( @criteria )\nThis method sets fields of the current form without having to know\ntheir names.  So if you have a login screen that wants a username and\npassword, you do not have to fetch the form and inspect the source (or\nuse the mech-dump utility, installed with WWW::Mechanize) to see what\nthe field names are; you can just say\n\n$mech->setvisible( $username, $password );\n\nand the first and second fields will be set accordingly.  The method is\ncalled setvisible because it acts only on visible fields; hidden form\ninputs are not considered.  The order of the fields is the order in\nwhich they appear in the HTML source which is nearly always the order\nanyone viewing the page would think they are in, but some creative work\nwith tables could change that; caveat user.\n\nEach element in @criteria is either a field value or a field specifier.\nA field value is a scalar.  A field specifier allows you to specify the\ntype of input field you want to set and is denoted with an arrayref\ncontaining two elements.  So you could specify the first radio button\nwith\n\n$mech->setvisible( [ radio => 'KCRW' ] );\n\nField values and specifiers can be intermixed, hence\n\n$mech->setvisible( 'fred', 'secret', [ option => 'Checking' ] );\n\nwould set the first two fields to \"fred\" and \"secret\", and the next\n\"OPTION\" menu field to \"Checking\".\n\nThe possible field specifier types are: \"text\", \"password\", \"hidden\",\n\"textarea\", \"file\", \"image\", \"submit\", \"radio\", \"checkbox\" and\n\"option\".\n\n\"setvisible\" returns the number of values set.\n\n$mech->tick( $name, $value [, $set] )\n\"Ticks\" the first checkbox that has both the name and value associated\nwith it on the current form.  Dies if there is no named check box for\nthat value.  Passing in a false value as the third optional argument\nwill cause the checkbox to be unticked.\n\n$mech->untick($name, $value)\nCauses the checkbox to be unticked.  Shorthand for\n\"tick($name,$value,undef)\"\n\n$mech->value( $name [, $number] )\nGiven the name of a field, return its value. This applies to the\ncurrent form.\n\nThe optional $number parameter is used to distinguish between two\nfields with the same name.  The fields are numbered from 1.\n\nIf the field is of type file (file upload field), the value is always\ncleared to prevent remote sites from downloading your local files.  To\nupload a file, specify its file name explicitly.\n\n$mech->click( $button [, $x, $y] )\nHas the effect of clicking a button on the current form.  The first\nargument is the name of the button to be clicked.  The second and third\narguments (optional) allow you to specify the (x,y) coordinates of the\nclick.\n\nIf there is only one button on the form, \"$mech->click()\" with no\narguments simply clicks that one button.\n\nReturns an HTTP::Response object.\n\n$mech->clickbutton( ... )\nHas the effect of clicking a button on the current form by specifying\nits attributes. The arguments are a list of key/value pairs. Only one\nof name, id, number, input or value must be specified in the keys.\n\nDies if no button is found.\n\no   \"name => name\"\n\nClicks the button named name in the current form.\n\no   \"id => id\"\n\nClicks the button with the id id in the current form.\n\no   \"number => n\"\n\nClicks the nth button with type submit in the current form.\nNumbering starts at 1.\n\no   \"value => value\"\n\nClicks the button with the value value in the current form.\n\no   \"input => $inputobject\"\n\nClicks on the button referenced by $inputobject, an instance of\nHTML::Form::SubmitInput obtained e.g. from\n\n$mech->currentform()->findinput( undef, 'submit' )\n\n$inputobject must belong to the current form.\n\no   \"x => x\"\n\no   \"y => y\"\n\nThese arguments (optional) allow you to specify the (x,y)\ncoordinates of the click.\n\n$mech->submit()\nSubmits the current form, without specifying a button to click.\nActually, no button is clicked at all.\n\nReturns an HTTP::Response object.\n\nThis used to be a synonym for \"$mech->click( 'submit' )\", but is no\nlonger so.\n\n$mech->submitform( ... )\nThis method lets you select a form from the previously fetched page,\nfill in its fields, and submit it. It combines the\n\"formnumber\"/\"formname\", \"setfields\" and \"click\" methods into one\nhigher level call. Its arguments are a list of key/value pairs, all of\nwhich are optional.\n\no   \"fields => \\%fields\"\n\nSpecifies the fields to be filled in the current form.\n\no   \"withfields => \\%fields\"\n\nProbably all you need for the common case. It combines a smart form\nselector and data setting in one operation. It selects the first\nform that contains all fields mentioned in \"\\%fields\".  This is\nnice because you don't need to know the name or number of the form\nto do this.\n\n(calls \"formwithfields()\" and\n\"setfields()\").\n\nIf you choose \"withfields\", the \"fields\" option will be ignored.\nThe \"formnumber\", \"formname\" and \"formid\" options will still be\nused.  An exception will be thrown unless exactly one form matches\nall of the provided criteria.\n\no   \"formnumber => n\"\n\nSelects the nth form (calls \"formnumber()\".  If this param is not\nspecified, the currently-selected form is used.\n\no   \"formname => name\"\n\nSelects the form named name (calls \"formname()\")\n\no   \"formid => ID\"\n\nSelects the form with ID ID (calls \"formid()\")\n\no   \"button => button\"\n\nClicks on button button (calls \"click()\")\n\no   \"x => x, y => y\"\n\nSets the x or y values for \"click()\"\n\no   \"strictforms => bool\"\n\nSets the HTML::Form strict flag which causes form submission to\ncroak if any of the passed fields don't exist on the page, and/or a\nvalue doesn't exist in a select element.  By default HTML::Form\nsets this value to false.\n\nThis behavior can also be turned on globally by passing\n\"strictforms => 1\" to \"WWW::Mechanize->new\". If you do that, you\ncan still disable it for individual calls by passing \"strictforms\n=> 0\" here.\n\nIf no form is selected, the first form found is used.\n\nIf button is not passed, then the \"submit()\" method is used instead.\n\nIf you want to submit a file and get its content from a scalar rather\nthan a file in the filesystem, you can use:\n\n$mech->submitform(withfields => { logfile => [ [ undef, 'whatever', Content => $content ], 1 ] } );\n\nReturns an HTTP::Response object.\n",
            "subsections": []
        },
        "MISCELLANEOUS METHODS": {
            "content": "$mech->addheader( name => $value [, name => $value... ] )\nSets HTTP headers for the agent to add or remove from the HTTP request.\n\n$mech->addheader( Encoding => 'text/klingon' );\n\nIf a value is \"undef\", then that header will be removed from any future\nrequests.  For example, to never send a Referer header:\n\n$mech->addheader( Referer => undef );\n\nIf you want to delete a header, use \"deleteheader\".\n\nReturns the number of name/value pairs added.\n\nNOTE: This method was very different in WWW::Mechanize before 1.00.\nBack then, the headers were stored in a package hash, not as a member\nof the object instance.  Calling \"addheader()\" would modify the\nheaders for every WWW::Mechanize object, even after your object no\nlonger existed.\n\n$mech->deleteheader( name [, name ... ] )\nRemoves HTTP headers from the agent's list of special headers.  For\ninstance, you might need to do something like:\n\n# Don't send a Referer for this URL\n$mech->addheader( Referer => undef );\n\n# Get the URL\n$mech->get( $url );\n\n# Back to the default behavior\n$mech->deleteheader( 'Referer' );\n\n$mech->quiet(true/false)\nAllows you to suppress warnings to the screen.\n\n$mech->quiet(0); # turns on warnings (the default)\n$mech->quiet(1); # turns off warnings\n$mech->quiet();  # returns the current quietness status\n\n$mech->stackdepth( $maxdepth )\nGet or set the page stack depth. Use this if you're doing a lot of page\nscraping and running out of memory.\n\nA value of 0 means \"no history at all.\"  By default, the max stack\ndepth is humongously large, effectively keeping all history.\n\n$mech->savecontent( $filename, %opts )\nDumps the contents of \"$mech->content\" into $filename.  $filename will\nbe overwritten.  Dies if there are any errors.\n\nIf the content type does not begin with \"text/\", then the content is\nsaved in binary mode (i.e. \"binmode()\" is set on the output\nfilehandle).\n\nAdditional arguments can be passed as key/value pairs:\n\n$mech->savecontent( $filename, binary => 1 )\nFilehandle is set with \"binmode\" to \":raw\" and contents are taken\ncalling \"$self->content(decodedbyheaders => 1)\". Same as calling:\n\n$mech->savecontent( $filename, binmode => ':raw',\ndecodedbyheaders => 1 );\n\nThis should be the safest way to save contents verbatim.\n\n$mech->savecontent( $filename, binmode => $binmode )\nFilehandle is set to binary mode. If $binmode begins with ':', it\nis passed as a parameter to \"binmode\":\n\nbinmode $fh, $binmode;\n\notherwise the filehandle is set to binary mode if $binmode is true:\n\nbinmode $fh;\n\nall other arguments\nare passed as-is to \"$mech->content(%opts)\". In particular,\n\"decodedbyheaders\" might come handy if you want to revert the\neffect of line compression performed by the web server but without\nfurther interpreting the contents (e.g. decoding it according to\nthe charset).\n\n$mech->dumpheaders( [$fh] )\nPrints a dump of the HTTP response headers for the most recent\nresponse.  If $fh is not specified or is undef, it dumps to STDOUT.\n\nUnlike the rest of the dump* methods, $fh can be a scalar. It will be\nused as a file name.\n\n$mech->dumplinks( [[$fh], $absolute] )\nPrints a dump of the links on the current page to $fh.  If $fh is not\nspecified or is undef, it dumps to STDOUT.\n\nIf $absolute is true, links displayed are absolute, not relative.\n\n$mech->dumpimages( [[$fh], $absolute] )\nPrints a dump of the images on the current page to $fh.  If $fh is not\nspecified or is undef, it dumps to STDOUT.\n\nIf $absolute is true, links displayed are absolute, not relative.\n\nThe output will include empty lines for images that have no \"src\"\nattribute and therefore no \"<-\"url>>.\n\n$mech->dumpforms( [$fh] )\nPrints a dump of the forms on the current page to $fh.  If $fh is not\nspecified or is undef, it dumps to STDOUT. Running the following:\n\nmy $mech = WWW::Mechanize->new();\n$mech->get(\"https://www.google.com/\");\n$mech->dumpforms;\n\nwill print:\n\nGET https://www.google.com/search [f]\nie=ISO-8859-1                  (hidden readonly)\nhl=en                          (hidden readonly)\nsource=hp                      (hidden readonly)\nbiw=                           (hidden readonly)\nbih=                           (hidden readonly)\nq=                             (text)\nbtnG=Google Search             (submit)\nbtnI=I'm Feeling Lucky         (submit)\ngbv=1                          (hidden readonly)\n\n$mech->dumptext( [$fh] )\nPrints a dump of the text on the current page to $fh.  If $fh is not\nspecified or is undef, it dumps to STDOUT.\n\nOVERRIDDEN LWP::UserAgent METHODS\n$mech->clone()\nClone the mech object.  The clone will be using the same cookie jar as\nthe original mech.\n\n$mech->redirectok()\nAn overloaded version of \"redirectok()\" in LWP::UserAgent.  This\nmethod is used to determine whether a redirection in the request should\nbe followed.\n\nNote that WWW::Mechanize's constructor pushes POST on to the agent's\n\"requestsredirectable\" list.\n\n$mech->request( $request [, $arg [, $size]])\nOverloaded version of \"request()\" in LWP::UserAgent.  Performs the\nactual request.  Normally, if you're using WWW::Mechanize, it's because\nyou don't want to deal with this level of stuff anyway.\n\nNote that $request will be modified.\n\nReturns an HTTP::Response object.\n\n$mech->updatehtml( $html )\nAllows you to replace the HTML that the mech has found.  Updates the\nforms and links parse-trees that the mech uses internally.\n\nSay you have a page that you know has malformed output, and you want to\nupdate it so the links come out correctly:\n\nmy $html = $mech->content;\n$html =~ s[</option>.{0,3}</td>][</option></select></td>]isg;\n$mech->updatehtml( $html );\n\nThis method is also used internally by the mech itself to update its\nown HTML content when loading a page. This means that if you would like\nto systematically perform the above HTML substitution, you would\noverload updatehtml in a subclass thusly:\n\npackage MyMech;\nuse base 'WWW::Mechanize';\n\nsub updatehtml {\nmy ($self, $html) = @;\n$html =~ s[</option>.{0,3}</td>][</option></select></td>]isg;\n$self->WWW::Mechanize::updatehtml( $html );\n}\n\nIf you do this, then the mech will use the tidied-up HTML instead of\nthe original both when parsing for its own needs, and for returning to\nyou through \"content()\".\n\nOverloading this method is also the recommended way of implementing\nextra validation steps (e.g. link checkers) for every HTML page\nreceived.  \"warn\" and \"die\" would then come in handy to signal\nvalidation errors.\n\n$mech->credentials( $username, $password )\nProvide credentials to be used for HTTP Basic authentication for all\nsites and realms until further notice.\n\nThe four argument form described in LWP::UserAgent is still supported.\n\n$mech->getbasiccredentials( $realm, $uri, $isproxy )\nReturns the credentials for the realm and URI.\n\n$mech->clearcredentials()\nRemove any credentials set up with \"credentials()\".\n\nINHERITED UNCHANGED LWP::UserAgent METHODS\nAs a subclass of LWP::UserAgent, WWW::Mechanize inherits all of\nLWP::UserAgent's methods.  Many of which are overridden or extended.\nThe following methods are inherited unchanged. View the LWP::UserAgent\ndocumentation for their implementation descriptions.\n\nThis is not meant to be an inclusive list.  LWP::UA may have added\nothers.\n\n$mech->head()\nInherited from LWP::UserAgent.\n\n$mech->mirror()\nInherited from LWP::UserAgent.\n\n$mech->simplerequest()\nInherited from LWP::UserAgent.\n\n$mech->isprotocolsupported()\nInherited from LWP::UserAgent.\n\n$mech->preparerequest()\nInherited from LWP::UserAgent.\n\n$mech->progress()\nInherited from LWP::UserAgent.\n",
            "subsections": []
        },
        "INTERNAL-ONLY METHODS": {
            "content": "These methods are only used internally.  You probably don't need to\nknow about them.\n\n$mech->updatepage($request, $response)\nUpdates all internal variables in $mech as if $request was just\nperformed, and returns $response. The page stack is not altered by this\nmethod, it is up to caller (e.g.  \"request\") to do that.\n\n$mech->modifyrequest( $req )\nModifies a HTTP::Request before the request is sent out, for both GET\nand POST requests.\n\nWe add a \"Referer\" header, as well as header to note that we can accept\ngzip encoded content, if Compress::Zlib is installed.\n\n$mech->makerequest()\nConvenience method to make it easier for subclasses like\nWWW::Mechanize::Cached to intercept the request.\n\n$mech->resetpage()\nResets the internal fields that track page parsed stuff.\n\n$mech->extractlinks()\nExtracts links from the content of a webpage, and populates the\n\"{links}\" property with WWW::Mechanize::Link objects.\n\n$mech->pushpagestack()\nThe agent keeps a stack of visited pages, which it can pop when it\nneeds to go BACK and so on.\n\nThe current page needs to be pushed onto the stack before we get a new\npage, and the stack needs to be popped when BACK occurs.\n\nNeither of these take any arguments, they just operate on the $mech\nobject.\n\nwarn( @messages )\nCentralized warning method, for diagnostics and non-fatal problems.\nDefaults to calling \"CORE::warn\", but may be overridden by setting\n\"onwarn\" in the constructor.\n\ndie( @messages )\nCentralized error method.  Defaults to calling \"CORE::die\", but may be\noverridden by setting \"onerror\" in the constructor.\n",
            "subsections": []
        },
        "BEST PRACTICES": {
            "content": "The default settings can get you up and running quickly, but there are\nsettings you can change in order to make your life easier.\n\nautocheck\n\"autocheck\" can save you the overhead of checking status codes for\nsuccess.  You may outgrow it as your needs get more sophisticated,\nbut it's a safe option to start with.\n\nmy $agent = WWW::Mechanize->new( autocheck => 1 );\n\ncookiejar\nYou are encouraged to install Mozilla::PublicSuffix and use\nHTTP::CookieJar::LWP as your cookie jar.  HTTP::CookieJar::LWP\nprovides a better security model matching that of current Web\nbrowsers when Mozilla::PublicSuffix is installed.\n\nuse HTTP::CookieJar::LWP ();\n\nmy $jar = HTTP::CookieJar::LWP->new;\nmy $agent = WWW::Mechanize->new( cookiejar => $jar );\n\nprotocolsallowed\nThis option is inherited directly from LWP::UserAgent.  It may be\nused to allow arbitrary protocols.\n\nmy $agent = WWW::Mechanize->new(\nprotocolsallowed => [ 'http', 'https' ]\n);\n\nThis will prevent you from inadvertently following URLs like\n\"file:///etc/passwd\"\n\nprotocolsforbidden\nThis option is also inherited directly from LWP::UserAgent.  It may\nbe used to deny arbitrary protocols.\n\nmy $agent = WWW::Mechanize->new(\nprotocolsforbidden => [ 'file', 'mailto', 'ssh', ]\n);\n\nThis will prevent you from inadvertently following URLs like\n\"file:///etc/passwd\"\n\nstrictforms\nConsider turning on the \"strictforms\" option when you create a new\nMech.  This will perform a helpful sanity check on form fields\nevery time you are submitting a form, which can save you a lot of\ndebugging time.\n\nmy $agent = WWW::Mechanize->new( strictforms => 1 );\n\nIf you do not want to have this option globally, you can still turn\nit on for individual forms.\n\n$agent->submitform( fields => { foo => 'bar' } , strictforms => 1 );\n\nWWW::MECHANIZE'S GIT REPOSITORY\nWWW::Mechanize is hosted at GitHub.\n\nRepository: <https://github.com/libwww-perl/WWW-Mechanize>.  Bugs:\n<https://github.com/libwww-perl/WWW-Mechanize/issues>.\n",
            "subsections": []
        },
        "OTHER DOCUMENTATION": {
            "content": "Spidering Hacks, by Kevin Hemenway and Tara Calishain\nSpidering Hacks from O'Reilly\n(<http://www.oreilly.com/catalog/spiderhks/>) is a great book for\nanyone wanting to know more about screen-scraping and spidering.\n\nThere are six hacks that use Mech or a Mech derivative:\n\n#21 WWW::Mechanize 101\n#22 Scraping with WWW::Mechanize\n#36 Downloading Images from Webshots\n#44 Archiving Yahoo! Groups Messages with WWW::Yahoo::Groups\n#64 Super Author Searching\n#73 Scraping TV Listings\n\nThe book was also positively reviewed on Slashdot:\n<http://books.slashdot.org/article.pl?sid=03/12/11/2126256>\n",
            "subsections": []
        },
        "ONLINE RESOURCES AND SUPPORT": {
            "content": "o   WWW::Mechanize mailing list\n\nThe Mech mailing list is at\n<http://groups.google.com/group/www-mechanize-users> and is\nspecific to Mechanize, unlike the LWP mailing list below.  Although\nit is a users list, all development discussion takes place here,\ntoo.\n\no   LWP mailing list\n\nThe LWP mailing list is at\n<http://lists.perl.org/showlist.cgi?name=libwww>, and is more user-\noriented and well-populated than the WWW::Mechanize list.\n\no   Perlmonks\n\n<http://perlmonks.org> is an excellent community of support, and\nmany questions about Mech have already been answered there.\n\no   WWW::Mechanize::Examples\n\nA random array of examples submitted by users, included with the\nMechanize distribution.\n\nARTICLES ABOUT WWW::MECHANIZE\no   <http://www.ibm.com/developerworks/linux/library/wa-perlsecure/>\n\nIBM article \"Secure Web site access with Perl\"\n\no   <http://www.oreilly.com/catalog/googlehks2/chapter/hack84.pdf>\n\nLeland Johnson's hack #84 in Google Hacks, 2nd Edition is an\nexample of a production script that uses WWW::Mechanize and\nHTML::TableContentParser. It takes in keywords and returns the\nestimated price of these keywords on Google's AdWords program.\n\no   <http://www.perl.com/pub/a/2004/06/04/recorder.html>\n\nLinda Julien writes about using HTTP::Recorder to create\nWWW::Mechanize scripts.\n\no   <http://www.developer.com/lang/other/article.php/3454041>\n\nJason Gilmore's article on using WWW::Mechanize for scraping sales\ninformation from Amazon and eBay.\n\no   <http://www.perl.com/pub/a/2003/01/22/mechanize.html>\n\nChris Ball's article about using WWW::Mechanize for scraping TV\nlistings.\n\no   <http://www.stonehenge.com/merlyn/LinuxMag/col47.html>\n\nRandal Schwartz's article on scraping Yahoo News for images.  It's\nalready out of date: He manually walks the list of links hunting\nfor matches, which wouldn't have been necessary if the\n\"findlink()\" method existed at press time.\n\no   <http://www.perladvent.org/2002/16th/>\n\nWWW::Mechanize on the Perl Advent Calendar, by Mark Fowler.\n\no   <http://www.linux-magazin.de/ausgaben/2004/03/datenruessel/>\n\nMichael Schilli's article on Mech and WWW::Mechanize::Shell for the\nGerman magazine Linux Magazin.\n\nOther modules that use Mechanize\nHere are modules that use or subclass Mechanize.  Let me know of any\nothers:\n\no   Finance::Bank::LloydsTSB\n\no   HTTP::Recorder\n\nActs as a proxy for web interaction, and then generates\nWWW::Mechanize scripts.\n\no   Win32::IE::Mechanize\n\nJust like Mech, but using Microsoft Internet Explorer to do the\nwork.\n\no   WWW::Bugzilla\n\no   WWW::Google::Groups\n\no   WWW::Hotmail\n\no   WWW::Mechanize::Cached\n\no   WWW::Mechanize::Cached::GZip\n\no   WWW::Mechanize::FormFiller\n\no   WWW::Mechanize::Shell\n\no   WWW::Mechanize::Sleepy\n\no   WWW::Mechanize::SpamCop\n\no   WWW::Mechanize::Timed\n\no   WWW::SourceForge\n\no   WWW::Yahoo::Groups\n\no   WWW::Scripter\n",
            "subsections": []
        },
        "ACKNOWLEDGEMENTS": {
            "content": "Thanks to the numerous people who have helped out on WWW::Mechanize in\none way or another, including Kirrily Robert for the original\n\"WWW::Automate\", Lyle Hopkins, Damien Clark, Ansgar Burchardt, Gisle\nAas, Jeremy Ary, Hilary Holz, Rafael Kitover, Norbert Buchmuller, Dave\nPage, David Sainty, H.Merijn Brand, Matt Lawrence, Michael Schwern,\nAdriano Ferreira, Miyagawa, Peteris Krumins, Rafael Kitover, David\nSteinbrunner, Kevin Falcone, Mike O'Regan, Mark Stosberg, Uri Guttman,\nPeter Scott, Philippe Bruhat, Ian Langworth, John Beppu, Gavin Estey,\nJim Brandt, Ask Bjoern Hansen, Greg Davies, Ed Silva, Mark-Jason\nDominus, Autrijus Tang, Mark Fowler, Stuart Children, Max Maischein,\nMeng Wong, Prakash Kailasa, Abigail, Jan Pazdziora, Dominique\nQuatravaux, Scott Lanning, Rob Casey, Leland Johnson, Joshua Gatcomb,\nJulien Beasley, Abe Timmerman, Peter Stevens, Pete Krawczyk, Tad\nMcClellan, and the late great Iain Truskett.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Andy Lester <andy at petdance.com>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is copyright (c) 2004 by Andy Lester.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n\nperl v5.32.1                      2021-10-30               WWW::Mechanize(3pm)",
            "subsections": []
        }
    },
    "summary": "WWW::Mechanize - Handy web browsing in a Perl object",
    "flags": [],
    "examples": [],
    "see_also": []
}