Hello community, here is the log from the commit of package perl-WWW-Mechanize for openSUSE:Factory checked in at 2019-11-06 15:15:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-WWW-Mechanize (Old) and /work/SRC/openSUSE:Factory/.perl-WWW-Mechanize.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-WWW-Mechanize" Wed Nov 6 15:15:27 2019 rev:28 rq:744725 version:1.95 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-WWW-Mechanize/perl-WWW-Mechanize.changes 2019-10-11 17:14:54.553591217 +0200 +++ /work/SRC/openSUSE:Factory/.perl-WWW-Mechanize.new.2990/perl-WWW-Mechanize.changes 2019-11-06 15:15:34.349141900 +0100 @@ -1,0 +2,10 @@ +Tue Oct 29 09:45:37 UTC 2019 - <[email protected]> + +- updated to 1.95 + see /usr/share/doc/packages/perl-WWW-Mechanize/Changes + + 1.95 2019-10-28 13:07:45Z + [FIXED] + - die if submit_form() called with invalid form_id (GH#287) (Olaf Alders) + +------------------------------------------------------------------- Old: ---- WWW-Mechanize-1.94.tar.gz New: ---- WWW-Mechanize-1.95.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-WWW-Mechanize.spec ++++++ --- /var/tmp/diff_new_pack.JiiXxB/_old 2019-11-06 15:15:35.501143034 +0100 +++ /var/tmp/diff_new_pack.JiiXxB/_new 2019-11-06 15:15:35.525143057 +0100 @@ -17,7 +17,7 @@ Name: perl-WWW-Mechanize -Version: 1.94 +Version: 1.95 Release: 0 %define cpan_name WWW-Mechanize Summary: Handy web browsing in a Perl object @@ -87,7 +87,7 @@ %prep %setup -q -n %{cpan_name}-%{version} -find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 +find . -type f ! -path "*/t/*" ! -name "*.pl" ! -name "*.sh" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor ++++++ WWW-Mechanize-1.94.tar.gz -> WWW-Mechanize-1.95.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/Changes new/WWW-Mechanize-1.95/Changes --- old/WWW-Mechanize-1.94/Changes 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/Changes 2019-10-28 14:07:52.000000000 +0100 @@ -1,5 +1,9 @@ Revision history for WWW::Mechanize +1.95 2019-10-28 13:07:45Z + [FIXED] + - die if submit_form() called with invalid form_id (GH#287) (Olaf Alders) + 1.94 2019-10-10 13:12:28Z [FIXED] - Issue #182: Don't autocheck for mech-dump so basic auth works (GH#285) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/MANIFEST new/WWW-Mechanize-1.95/MANIFEST --- old/WWW-Mechanize-1.94/MANIFEST 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/MANIFEST 2019-10-28 14:07:52.000000000 +0100 @@ -96,6 +96,7 @@ t/save_content.t t/select.html t/select.t +t/submit_form.t t/taint.t t/tick.html t/tick.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/META.json new/WWW-Mechanize-1.95/META.json --- old/WWW-Mechanize-1.94/META.json 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/META.json 2019-10-28 14:07:52.000000000 +0100 @@ -44,6 +44,7 @@ "Perl::Tidy" : "20180220", "Pod::Coverage::TrustPod" : "0", "Test::Code::TidyAll" : "0.50", + "Test::Memory::Cycle" : "1.06", "Test::More" : "0.88", "Test::Needs" : "0", "Test::Pod" : "1.41", @@ -109,15 +110,15 @@ "provides" : { "WWW::Mechanize" : { "file" : "lib/WWW/Mechanize.pm", - "version" : "1.94" + "version" : "1.95" }, "WWW::Mechanize::Image" : { "file" : "lib/WWW/Mechanize/Image.pm", - "version" : "1.94" + "version" : "1.95" }, "WWW::Mechanize::Link" : { "file" : "lib/WWW/Mechanize/Link.pm", - "version" : "1.94" + "version" : "1.95" } }, "release_status" : "stable", @@ -132,10 +133,10 @@ "web" : "https://github.com/libwww-perl/WWW-Mechanize" } }, - "version" : "1.94", + "version" : "1.95", "x_Dist_Zilla" : { "perl" : { - "version" : "5.026001" + "version" : "5.030000" }, "plugins" : [ { @@ -173,7 +174,7 @@ { "class" : "Dist::Zilla::Plugin::MAXMIND::TidyAll", "name" : "@Author::OALDERS/MAXMIND::TidyAll", - "version" : "0.83" + "version" : "0.13" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", @@ -619,7 +620,7 @@ "branch" : null, "changelog" : "Changes", "signed" : 0, - "tag" : "v1.94", + "tag" : "v1.95", "tag_format" : "v%V", "tag_message" : "v%V" }, @@ -888,8 +889,8 @@ "Ville Skytt\u00e4 <[email protected]>", "Zefram <[email protected]>" ], - "x_generated_by_perl" : "v5.26.1", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.10", + "x_generated_by_perl" : "v5.30.0", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.14", "x_static_install" : 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/META.yml new/WWW-Mechanize-1.95/META.yml --- old/WWW-Mechanize-1.94/META.yml 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/META.yml 2019-10-28 14:07:52.000000000 +0100 @@ -41,13 +41,13 @@ provides: WWW::Mechanize: file: lib/WWW/Mechanize.pm - version: '1.94' + version: '1.95' WWW::Mechanize::Image: file: lib/WWW/Mechanize/Image.pm - version: '1.94' + version: '1.95' WWW::Mechanize::Link: file: lib/WWW/Mechanize/Link.pm - version: '1.94' + version: '1.95' requires: Carp: '0' Getopt::Long: '0' @@ -72,10 +72,10 @@ bugtracker: https://github.com/libwww-perl/WWW-Mechanize/issues homepage: https://github.com/libwww-perl/WWW-Mechanize repository: https://github.com/libwww-perl/WWW-Mechanize.git -version: '1.94' +version: '1.95' x_Dist_Zilla: perl: - version: '5.026001' + version: '5.030000' plugins: - class: Dist::Zilla::Plugin::PromptIfStale @@ -105,7 +105,7 @@ - class: Dist::Zilla::Plugin::MAXMIND::TidyAll name: '@Author::OALDERS/MAXMIND::TidyAll' - version: '0.83' + version: '0.13' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::OALDERS/AutoPrereqs' @@ -450,7 +450,7 @@ branch: ~ changelog: Changes signed: 0 - tag: v1.94 + tag: v1.95 tag_format: v%V tag_message: v%V Dist::Zilla::Role::Git::Repo: @@ -660,6 +660,6 @@ - 'Varadinsky <[email protected]>' - 'Ville Skyttä <[email protected]>' - 'Zefram <[email protected]>' -x_generated_by_perl: v5.26.1 +x_generated_by_perl: v5.30.0 x_serialization_backend: 'YAML::Tiny version 1.73' x_static_install: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/Makefile.PL new/WWW-Mechanize-1.95/Makefile.PL --- old/WWW-Mechanize-1.94/Makefile.PL 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/Makefile.PL 2019-10-28 14:07:52.000000000 +0100 @@ -62,7 +62,7 @@ "lib" => 0, "vars" => 0 }, - "VERSION" => "1.94", + "VERSION" => "1.95", "test" => { "TESTS" => "t/*.t t/local/*.t t/mech-dump/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/README.md new/WWW-Mechanize-1.95/README.md --- old/WWW-Mechanize-1.94/README.md 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/README.md 2019-10-28 14:07:52.000000000 +0100 @@ -4,7 +4,7 @@ # VERSION -version 1.94 +version 1.95 # SYNOPSIS @@ -71,7 +71,7 @@ - HTTP authentication Mech is well suited for use in testing web applications. If you use -one of the Test::\*, like [Test::HTML::Lint](https://metacpan.org/pod/Test::HTML::Lint) modules, you can check the +one of the Test::\*, like [Test::HTML::Lint](https://metacpan.org/pod/Test%3A%3AHTML%3A%3ALint) modules, you can check the fetched content and use that as input to a test call. use Test::More; @@ -94,13 +94,13 @@ $mech->set_visible( @criteria ); $mech->click( $button ); -[WWW::Mechanize](https://metacpan.org/pod/WWW::Mechanize) is a proper subclass of [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent) and -you can also use any of [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent)'s methods. +[WWW::Mechanize](https://metacpan.org/pod/WWW%3A%3AMechanize) is a proper subclass of [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent) and +you can also use any of [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent)'s methods. $mech->add_header($name => $value); Please note that Mech does NOT support JavaScript, you need additional software -for that. Please check ["JavaScript" in WWW::Mechanize::FAQ](https://metacpan.org/pod/WWW::Mechanize::FAQ#JavaScript) for more. +for that. Please check ["JavaScript" in WWW::Mechanize::FAQ](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3AFAQ#JavaScript) for more. # IMPORTANT LINKS @@ -143,7 +143,7 @@ my $mech = WWW::Mechanize->new( cookie_jar => undef ); Here are the parms that WWW::Mechanize recognizes. These do not include -parms that [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent) recognizes. +parms that [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent) recognizes. - `autocheck => [0|1]` @@ -152,19 +152,19 @@ are errors, not warnings. The default value is ON, unless it's being subclassed, in which - case it is OFF. This means that standalone [WWW::Mechanize](https://metacpan.org/pod/WWW::Mechanize) instances + case it is OFF. This means that standalone [WWW::Mechanize](https://metacpan.org/pod/WWW%3A%3AMechanize) instances have autocheck turned on, which is protective for the vast majority of Mech users who don't bother checking the return value of get() and post() and can't figure why their code fails. However, if - [WWW::Mechanize](https://metacpan.org/pod/WWW::Mechanize) is subclassed, such as for [Test::WWW::Mechanize](https://metacpan.org/pod/Test::WWW::Mechanize) - or [Test::WWW::Mechanize::Catalyst](https://metacpan.org/pod/Test::WWW::Mechanize::Catalyst), this may not be an appropriate + [WWW::Mechanize](https://metacpan.org/pod/WWW%3A%3AMechanize) is subclassed, such as for [Test::WWW::Mechanize](https://metacpan.org/pod/Test%3A%3AWWW%3A%3AMechanize) + or [Test::WWW::Mechanize::Catalyst](https://metacpan.org/pod/Test%3A%3AWWW%3A%3AMechanize%3A%3ACatalyst), this may not be an appropriate default, so it's off. - `noproxy => [0|1]` - Turn off the automatic call to the [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent) `env_proxy` function. + Turn off the automatic call to the [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent) `env_proxy` function. - This needs to be explicitly turned off if you're using [Crypt::SSLeay](https://metacpan.org/pod/Crypt::SSLeay) to + This needs to be explicitly turned off if you're using [Crypt::SSLeay](https://metacpan.org/pod/Crypt%3A%3ASSLeay) to access a https site via a proxy server. Note: you still need to set your HTTPS\_PROXY environment variable as appropriate. @@ -203,7 +203,7 @@ history. In addition, WWW::Mechanize also allows you to globally enable -strict and verbose mode for form handling, which is done with [HTML::Form](https://metacpan.org/pod/HTML::Form). +strict and verbose mode for form handling, which is done with [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm). - `strict_forms => [0|1]` @@ -224,7 +224,7 @@ To support forms, WWW::Mechanize's constructor pushes POST on to the agent's `requests_redirectable` list (see also -[LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent).) +[LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent).) ## $mech->agent\_alias( $alias ) @@ -263,16 +263,16 @@ ## $mech->get( $uri ) -Given a URL/URI, fetches it. Returns an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object. +Given a URL/URI, fetches it. Returns an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object. _$uri_ can be a well-formed URL string, a [URI](https://metacpan.org/pod/URI) object, or a -[WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) object. +[WWW::Mechanize::Link](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ALink) object. The results are stored internally in the agent object, but you don't know that. Just use the accessors listed below. Poking at the internals is deprecated and subject to change in the future. `get()` is a well-behaved overloaded version of the method in -[LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). This lets you do things like +[LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). This lets you do things like $mech->get( $uri, ':content_file' => $tempfile ); @@ -285,22 +285,22 @@ ## $mech->post( $uri, content => $content ) -POSTs _$content_ to $uri. Returns an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object. +POSTs _$content_ to $uri. Returns an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object. _$uri_ can be a well-formed URI string, a [URI](https://metacpan.org/pod/URI) object, or a -[WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) object. +[WWW::Mechanize::Link](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ALink) object. ## $mech->put( $uri, content => $content ) -PUTs _$content_ to $uri. Returns an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object. +PUTs _$content_ to $uri. Returns an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object. _$uri_ can be a well-formed URI string, a [URI](https://metacpan.org/pod/URI) object, or a -[WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) object. +[WWW::Mechanize::Link](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ALink) object. ## $mech->reload() Acts like the reload button in a browser: repeats the current request. The history (as per the [back()](#mech-back) method) is not altered. -Returns the [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object from the reload, or `undef` +Returns the [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object from the reload, or `undef` if there's no current request. ## $mech->back() @@ -351,7 +351,7 @@ ## $mech->response() / $mech->res() -Return the current response as an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object. +Return the current response as an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object. Synonym for `$mech->response()` @@ -372,18 +372,18 @@ When called in a list context, returns a list of the forms found in the last fetched page. In a scalar context, returns a reference to -an array with those forms. The forms returned are all [HTML::Form](https://metacpan.org/pod/HTML::Form) +an array with those forms. The forms returned are all [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) objects. ## $mech->current\_form() -Returns the current form as an [HTML::Form](https://metacpan.org/pod/HTML::Form) object. +Returns the current form as an [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) object. ## $mech->links() When called in a list context, returns a list of the links found in the last fetched page. In a scalar context it returns a reference to an array -with those links. Each link is a [WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) object. +with those links. Each link is a [WWW::Mechanize::Link](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ALink) object. ## $mech->is\_html() @@ -393,7 +393,7 @@ ## $mech->title() Returns the contents of the `<TITLE>` tag, as parsed by -[HTML::HeadParser](https://metacpan.org/pod/HTML::HeadParser). Returns undef if the content is not HTML. +[HTML::HeadParser](https://metacpan.org/pod/HTML%3A%3AHeadParser). Returns undef if the content is not HTML. # CONTENT-HANDLING METHODS @@ -419,7 +419,7 @@ Returns the HTML document, modified to contain a `<base href="$base_href">` mark-up in the header. _$base\_href_ is `$mech->base()` if not specified. This is - handy to pass the HTML to e.g. [HTML::Display](https://metacpan.org/pod/HTML::Display). This works only if + handy to pass the HTML to e.g. [HTML::Display](https://metacpan.org/pod/HTML%3A%3ADisplay). This works only if the contents are HTML. - _$mech->content( raw => 1 )_ @@ -435,7 +435,7 @@ - _$mech->content( charset => $charset )_ Returns `$self->response()->decoded_content(charset => $charset)` - (see [HTTP::Response](https://metacpan.org/pod/HTTP::Response) for details). + (see [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) for details). To preserve backwards compatibility, additional parameters will be ignored unless none of `raw | decoded_by_headers | charset` is @@ -489,7 +489,7 @@ $mech->follow_link( url => 'http://example.com/page' ); -Returns the result of the `GET` method (an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object) if a link +Returns the result of the `GET` method (an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object) if a link was found. If the page has no links, or the specified link couldn't be found, returns @@ -498,7 +498,7 @@ ## $mech->find\_link( ... ) Finds a link in the currently fetched page. It returns a -[WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) object which describes the link. (You'll +[WWW::Mechanize::Link](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ALink) object which describes the link. (You'll probably be most interested in the `url()` property.) If it fails to find a link it returns undef. @@ -575,7 +575,7 @@ $mech->find_link( text => 'News', url_regex => qr/cnn\.com/ ); The return value is a reference to an array containing a -[WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) object for every link in `$self->content`. +[WWW::Mechanize::Link](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ALink) object for every link in `$self->content`. The links come from the following: @@ -591,7 +591,7 @@ Returns all the links on the current page that match the criteria. The method for specifying link criteria is the same as in `[find_link()](#mech-find_link)`. -Each of the links returned is a [WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) object. +Each of the links returned is a [WWW::Mechanize::Link](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ALink) object. In list context, `find_all_links()` returns a list of the links. Otherwise, it returns a reference to the list of links. @@ -604,7 +604,7 @@ find\_all\_inputs() returns an array of all the input controls in the current form whose properties match all of the regexes passed in. The controls returned are all descended from HTML::Form::Input. -See ["INPUTS" in HTML::Form](https://metacpan.org/pod/HTML::Form#INPUTS) for details. +See ["INPUTS" in HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm#INPUTS) for details. If no criteria are passed, all inputs will be returned. @@ -643,7 +643,7 @@ ## $mech->find\_image() Finds an image in the current page. It returns a -[WWW::Mechanize::Image](https://metacpan.org/pod/WWW::Mechanize::Image) object which describes the image. If it fails +[WWW::Mechanize::Image](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3AImage) object which describes the image. If it fails to find an image it returns undef. You can select which image to find by passing in one or more of these @@ -734,14 +734,14 @@ $mech->find_image( image => 'News', url_regex => qr/cnn\.com/ ); The return value is a reference to an array containing a -[WWW::Mechanize::Image](https://metacpan.org/pod/WWW::Mechanize::Image) object for every image in `$self->content`. +[WWW::Mechanize::Image](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3AImage) object for every image in `$self->content`. ## $mech->find\_all\_images( ... ) Returns all the images on the current page that match the criteria. The method for specifying image criteria is the same as in `[find_image()](#mech-find_image)`. -Each of the images returned is a [WWW::Mechanize::Image](https://metacpan.org/pod/WWW::Mechanize::Image) object. +Each of the images returned is a [WWW::Mechanize::Image](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3AImage) object. In list context, `find_all_images()` returns a list of the images. Otherwise, it returns a reference to the list of images. @@ -756,7 +756,7 @@ ## $mech->forms -Lists all the forms on the current page. Each form is an [HTML::Form](https://metacpan.org/pod/HTML::Form) +Lists all the forms on the current page. Each form is an [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) object. In list context, returns a list of all forms. In scalar context, returns an array reference of all forms. @@ -767,7 +767,7 @@ and `[click()](#mech-click-button-x-y)`. Also returns the form that was selected. -If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML::Form) object and set internally +If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) object and set internally for later use with Mech's form methods such as `[field()](#mech-field-name-value-number)` and `[click()](#mech-click-button-x-y)`. @@ -784,7 +784,7 @@ with that name, then the first one is used, and a warning is generated. -If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML::Form) object and +If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) object and set internally for later use with Mech's form methods such as `[field()](#mech-field-name-value-number)` and `[click()](#mech-click-button-x-y)`. @@ -796,7 +796,7 @@ Selects a form by ID. If there is more than one form on the page with that ID, then the first one is used, and a warning is generated. -If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML::Form) object and +If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) object and set internally for later use with Mech's form methods such as `[field()](#mech-field-name-value-number)` and `[click()](#mech-click-button-x-y)`. @@ -806,7 +806,7 @@ ## $mech->all\_forms\_with\_fields( @fields ) -Selects a form by passing in a list of field names it must contain. All matching forms (perhaps none) are returned as a list of [HTML::Form](https://metacpan.org/pod/HTML::Form) objects. +Selects a form by passing in a list of field names it must contain. All matching forms (perhaps none) are returned as a list of [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) objects. ## $mech->form\_with\_fields( @fields ) @@ -814,7 +814,7 @@ is more than one form on the page with that matches, then the first one is used, and a warning is generated. -If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML::Form) object and set internally +If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) object and set internally for later used with Mech's form methods such as `[field()](#mech-field-name-value-number)` and `[click()](#mech-click-button-x-y)`. @@ -828,22 +828,22 @@ Searches for forms with arbitrary attribute/value pairs within the <form> tag. (Currently does not work for attribute `action` due to implementation details -of [HTML::Form](https://metacpan.org/pod/HTML::Form).) +of [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm).) When given more than one pair, all criteria must match. Using `undef` as value means that the attribute in question may not be present. -All matching forms (perhaps none) are returned as a list of [HTML::Form](https://metacpan.org/pod/HTML::Form) objects. +All matching forms (perhaps none) are returned as a list of [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) objects. ## $mech->form\_with( $attr1 => $value1, $attr2 => $value2, ... ) Searches for forms with arbitrary attribute/value pairs within the <form> tag. (Currently does not work for attribute `action` due to implementation details -of [HTML::Form](https://metacpan.org/pod/HTML::Form).) +of [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm).) When given more than one pair, all criteria must match. Using `undef` as value means that the attribute in question may not be present. -If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML::Form) object and set internally +If it is found, the form is returned as an [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm) object and set internally for later used with Mech's form methods such as `[field()](#mech-field-name-value-number)` and `[click()](#mech-click-button-x-y)`. @@ -974,7 +974,7 @@ If there is only one button on the form, `$mech->click()` with no arguments simply clicks that one button. -Returns an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object. +Returns an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object. ## $mech->click\_button( ... ) @@ -1002,7 +1002,7 @@ - `input => $inputobject` Clicks on the button referenced by $inputobject, an instance of - [HTML::Form::SubmitInput](https://metacpan.org/pod/HTML::Form::SubmitInput) obtained e.g. from + [HTML::Form::SubmitInput](https://metacpan.org/pod/HTML%3A%3AForm%3A%3ASubmitInput) obtained e.g. from $mech->current_form()->find_input( undef, 'submit' ) @@ -1019,7 +1019,7 @@ Submits the current form, without specifying a button to click. Actually, no button is clicked at all. -Returns an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object. +Returns an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object. This used to be a synonym for `$mech->click( 'submit' )`, but is no longer so. @@ -1094,7 +1094,7 @@ $mech->submit_form(with_fields => { logfile => [ [ undef, 'whatever', Content => $content ], 1 ] } ); -Returns an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object. +Returns an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object. # MISCELLANEOUS METHODS @@ -1249,7 +1249,7 @@ ## $mech->redirect\_ok() -An overloaded version of `redirect_ok()` in [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). +An overloaded version of `redirect_ok()` in [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). This method is used to determine whether a redirection in the request should be followed. @@ -1258,13 +1258,13 @@ ## $mech->request( $request \[, $arg \[, $size\]\]) -Overloaded version of `request()` in [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). Performs +Overloaded version of `request()` in [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). Performs the actual request. Normally, if you're using WWW::Mechanize, it's because you don't want to deal with this level of stuff anyway. Note that `$request` will be modified. -Returns an [HTTP::Response](https://metacpan.org/pod/HTTP::Response) object. +Returns an [HTTP::Response](https://metacpan.org/pod/HTTP%3A%3AResponse) object. ## $mech->update\_html( $html ) @@ -1306,7 +1306,7 @@ Provide credentials to be used for HTTP Basic authentication for all sites and realms until further notice. -The four argument form described in [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent) is still +The four argument form described in [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent) is still supported. ## $mech->get\_basic\_credentials( $realm, $uri, $isproxy ) @@ -1319,37 +1319,37 @@ # INHERITED UNCHANGED LWP::UserAgent METHODS -As a subclass of [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent), WWW::Mechanize inherits all of -[LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent)'s methods. Many of which are overridden or +As a subclass of [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent), WWW::Mechanize inherits all of +[LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent)'s methods. Many of which are overridden or extended. The following methods are inherited unchanged. View the -[LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent) documentation for their implementation descriptions. +[LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent) documentation for their implementation descriptions. This is not meant to be an inclusive list. LWP::UA may have added others. ## $mech->head() -Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). +Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). ## $mech->mirror() -Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). +Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). ## $mech->simple\_request() -Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). +Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). ## $mech->is\_protocol\_supported() -Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). +Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). ## $mech->prepare\_request() -Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). +Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). ## $mech->progress() -Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). +Inherited from [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). # INTERNAL-ONLY METHODS @@ -1366,16 +1366,16 @@ ## $mech->\_modify\_request( $req ) -Modifies a [HTTP::Request](https://metacpan.org/pod/HTTP::Request) before the request is sent out, +Modifies a [HTTP::Request](https://metacpan.org/pod/HTTP%3A%3ARequest) before the request is sent out, for both GET and POST requests. We add a `Referer` header, as well as header to note that we can accept gzip -encoded content, if [Compress::Zlib](https://metacpan.org/pod/Compress::Zlib) is installed. +encoded content, if [Compress::Zlib](https://metacpan.org/pod/Compress%3A%3AZlib) is installed. ## $mech->\_make\_request() Convenience method to make it easier for subclasses like -[WWW::Mechanize::Cached](https://metacpan.org/pod/WWW::Mechanize::Cached) to intercept the request. +[WWW::Mechanize::Cached](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ACached) to intercept the request. ## $mech->\_reset\_page() @@ -1384,7 +1384,7 @@ ## $mech->\_extract\_links() Extracts links from the content of a webpage, and populates the `{links}` -property with [WWW::Mechanize::Link](https://metacpan.org/pod/WWW::Mechanize::Link) objects. +property with [WWW::Mechanize::Link](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ALink) objects. ## $mech->\_push\_page\_stack() @@ -1423,10 +1423,10 @@ - cookie\_jar - You are encouraged to install [Mozilla::PublicSuffix](https://metacpan.org/pod/Mozilla::PublicSuffix) and use - [HTTP::CookieJar::LWP](https://metacpan.org/pod/HTTP::CookieJar::LWP) as your cookie jar. [HTTP::CookieJar::LWP](https://metacpan.org/pod/HTTP::CookieJar::LWP) provides a + You are encouraged to install [Mozilla::PublicSuffix](https://metacpan.org/pod/Mozilla%3A%3APublicSuffix) and use + [HTTP::CookieJar::LWP](https://metacpan.org/pod/HTTP%3A%3ACookieJar%3A%3ALWP) as your cookie jar. [HTTP::CookieJar::LWP](https://metacpan.org/pod/HTTP%3A%3ACookieJar%3A%3ALWP) provides a better security model matching that of current Web browsers when - [Mozilla::PublicSuffix](https://metacpan.org/pod/Mozilla::PublicSuffix) is installed. + [Mozilla::PublicSuffix](https://metacpan.org/pod/Mozilla%3A%3APublicSuffix) is installed. use HTTP::CookieJar::LWP (); @@ -1435,7 +1435,7 @@ - protocols\_allowed - This option is inherited directly from [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). It allows you to + This option is inherited directly from [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). It allows you to whitelist the protocols you're willing to allow. my $agent = WWW::Mechanize->new( @@ -1447,7 +1447,7 @@ - protocols\_forbidden - This option is also inherited directly from [LWP::UserAgent](https://metacpan.org/pod/LWP::UserAgent). It allows you to + This option is also inherited directly from [LWP::UserAgent](https://metacpan.org/pod/LWP%3A%3AUserAgent). It allows you to blacklist the protocols you're unwilling to allow. my $agent = WWW::Mechanize->new( @@ -1517,7 +1517,7 @@ [http://perlmonks.org](http://perlmonks.org) is an excellent community of support, and many questions about Mech have already been answered there. -- [WWW::Mechanize::Examples](https://metacpan.org/pod/WWW::Mechanize::Examples) +- [WWW::Mechanize::Examples](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3AExamples) A random array of examples submitted by users, included with the Mechanize distribution. @@ -1563,36 +1563,36 @@ - [http://www.linux-magazin.de/ausgaben/2004/03/datenruessel/](http://www.linux-magazin.de/ausgaben/2004/03/datenruessel/) - Michael Schilli's article on Mech and [WWW::Mechanize::Shell](https://metacpan.org/pod/WWW::Mechanize::Shell) for the + Michael Schilli's article on Mech and [WWW::Mechanize::Shell](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3AShell) for the German magazine _Linux Magazin_. ## Other modules that use Mechanize Here are modules that use or subclass Mechanize. Let me know of any others: -- [Finance::Bank::LloydsTSB](https://metacpan.org/pod/Finance::Bank::LloydsTSB) -- [HTTP::Recorder](https://metacpan.org/pod/HTTP::Recorder) +- [Finance::Bank::LloydsTSB](https://metacpan.org/pod/Finance%3A%3ABank%3A%3ALloydsTSB) +- [HTTP::Recorder](https://metacpan.org/pod/HTTP%3A%3ARecorder) Acts as a proxy for web interaction, and then generates WWW::Mechanize scripts. -- [Win32::IE::Mechanize](https://metacpan.org/pod/Win32::IE::Mechanize) +- [Win32::IE::Mechanize](https://metacpan.org/pod/Win32%3A%3AIE%3A%3AMechanize) Just like Mech, but using Microsoft Internet Explorer to do the work. -- [WWW::Bugzilla](https://metacpan.org/pod/WWW::Bugzilla) -- [WWW::CheckSite](https://metacpan.org/pod/WWW::CheckSite) -- [WWW::Google::Groups](https://metacpan.org/pod/WWW::Google::Groups) -- [WWW::Hotmail](https://metacpan.org/pod/WWW::Hotmail) -- [WWW::Mechanize::Cached](https://metacpan.org/pod/WWW::Mechanize::Cached) -- [WWW::Mechanize::Cached::GZip](https://metacpan.org/pod/WWW::Mechanize::Cached::GZip) -- [WWW::Mechanize::FormFiller](https://metacpan.org/pod/WWW::Mechanize::FormFiller) -- [WWW::Mechanize::Shell](https://metacpan.org/pod/WWW::Mechanize::Shell) -- [WWW::Mechanize::Sleepy](https://metacpan.org/pod/WWW::Mechanize::Sleepy) -- [WWW::Mechanize::SpamCop](https://metacpan.org/pod/WWW::Mechanize::SpamCop) -- [WWW::Mechanize::Timed](https://metacpan.org/pod/WWW::Mechanize::Timed) -- [WWW::SourceForge](https://metacpan.org/pod/WWW::SourceForge) -- [WWW::Yahoo::Groups](https://metacpan.org/pod/WWW::Yahoo::Groups) -- [WWW::Scripter](https://metacpan.org/pod/WWW::Scripter) +- [WWW::Bugzilla](https://metacpan.org/pod/WWW%3A%3ABugzilla) +- [WWW::CheckSite](https://metacpan.org/pod/WWW%3A%3ACheckSite) +- [WWW::Google::Groups](https://metacpan.org/pod/WWW%3A%3AGoogle%3A%3AGroups) +- [WWW::Hotmail](https://metacpan.org/pod/WWW%3A%3AHotmail) +- [WWW::Mechanize::Cached](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ACached) +- [WWW::Mechanize::Cached::GZip](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ACached%3A%3AGZip) +- [WWW::Mechanize::FormFiller](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3AFormFiller) +- [WWW::Mechanize::Shell](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3AShell) +- [WWW::Mechanize::Sleepy](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ASleepy) +- [WWW::Mechanize::SpamCop](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ASpamCop) +- [WWW::Mechanize::Timed](https://metacpan.org/pod/WWW%3A%3AMechanize%3A%3ATimed) +- [WWW::SourceForge](https://metacpan.org/pod/WWW%3A%3ASourceForge) +- [WWW::Yahoo::Groups](https://metacpan.org/pod/WWW%3A%3AYahoo%3A%3AGroups) +- [WWW::Scripter](https://metacpan.org/pod/WWW%3A%3AScripter) # ACKNOWLEDGEMENTS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/cpanfile new/WWW-Mechanize-1.95/cpanfile --- old/WWW-Mechanize-1.94/cpanfile 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/cpanfile 2019-10-28 14:07:52.000000000 +0100 @@ -65,6 +65,7 @@ requires "Perl::Tidy" => "20180220"; requires "Pod::Coverage::TrustPod" => "0"; requires "Test::Code::TidyAll" => "0.50"; + requires "Test::Memory::Cycle" => "1.06"; requires "Test::More" => "0.88"; requires "Test::Needs" => "0"; requires "Test::Pod" => "1.41"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/dist.ini new/WWW-Mechanize-1.95/dist.ini --- old/WWW-Mechanize-1.94/dist.ini 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/dist.ini 2019-10-28 14:07:52.000000000 +0100 @@ -32,6 +32,7 @@ Code::TidyAll::Plugin::SortLines::Naturally = 0.000003 Perl::Critic = 0 Perl::Tidy = 0 +Test::Memory::Cycle = 1.06 [MetaProvides::Package] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/lib/WWW/Mechanize/Cookbook.pod new/WWW-Mechanize-1.95/lib/WWW/Mechanize/Cookbook.pod --- old/WWW-Mechanize-1.94/lib/WWW/Mechanize/Cookbook.pod 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/lib/WWW/Mechanize/Cookbook.pod 2019-10-28 14:07:53.000000000 +0100 @@ -13,7 +13,7 @@ =head1 VERSION -version 1.94 +version 1.95 =head1 INTRODUCTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/lib/WWW/Mechanize/Examples.pod new/WWW-Mechanize-1.95/lib/WWW/Mechanize/Examples.pod --- old/WWW-Mechanize-1.94/lib/WWW/Mechanize/Examples.pod 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/lib/WWW/Mechanize/Examples.pod 2019-10-28 14:07:53.000000000 +0100 @@ -13,7 +13,7 @@ =head1 VERSION -version 1.94 +version 1.95 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/lib/WWW/Mechanize/FAQ.pod new/WWW-Mechanize-1.95/lib/WWW/Mechanize/FAQ.pod --- old/WWW-Mechanize-1.94/lib/WWW/Mechanize/FAQ.pod 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/lib/WWW/Mechanize/FAQ.pod 2019-10-28 14:07:53.000000000 +0100 @@ -13,7 +13,7 @@ =head1 VERSION -version 1.94 +version 1.95 =head1 How to get help with WWW::Mechanize diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/lib/WWW/Mechanize/Image.pm new/WWW-Mechanize-1.95/lib/WWW/Mechanize/Image.pm --- old/WWW-Mechanize-1.94/lib/WWW/Mechanize/Image.pm 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/lib/WWW/Mechanize/Image.pm 2019-10-28 14:07:53.000000000 +0100 @@ -3,7 +3,7 @@ use strict; use warnings; -our $VERSION = '1.94'; +our $VERSION = '1.95'; #ABSTRACT: Image object for WWW::Mechanize @@ -69,7 +69,7 @@ =head1 VERSION -version 1.94 +version 1.95 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/lib/WWW/Mechanize/Link.pm new/WWW-Mechanize-1.95/lib/WWW/Mechanize/Link.pm --- old/WWW-Mechanize-1.94/lib/WWW/Mechanize/Link.pm 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/lib/WWW/Mechanize/Link.pm 2019-10-28 14:07:53.000000000 +0100 @@ -3,7 +3,7 @@ use strict; use warnings; -our $VERSION = '1.94'; +our $VERSION = '1.95'; #ABSTRACT: Link object for WWW::Mechanize @@ -65,7 +65,7 @@ =head1 VERSION -version 1.94 +version 1.95 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/lib/WWW/Mechanize.pm new/WWW-Mechanize-1.95/lib/WWW/Mechanize.pm --- old/WWW-Mechanize-1.94/lib/WWW/Mechanize.pm 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/lib/WWW/Mechanize.pm 2019-10-28 14:07:53.000000000 +0100 @@ -6,7 +6,7 @@ use strict; use warnings; -our $VERSION = '1.94'; +our $VERSION = '1.95'; use Tie::RefHash; use HTTP::Request 1.30; @@ -1015,8 +1015,7 @@ for ( keys %args ) { if ( !/^(form_(number|name|fields|id)|(with_)?fields|button|x|y|strict_forms)$/ ) { - # XXX Why not die here? - $self->warn( qq{Unknown submit_form parameter "$_"} ); + $self->die( qq{Unknown submit_form parameter "$_"} ); } } @@ -1027,7 +1026,7 @@ $fields = $args{$_}; } else { - die "$_ arg to submit_form must be a hashref"; + $self->die("$_ arg to submit_form must be a hashref"); } last; } @@ -1037,22 +1036,22 @@ if ( $args{with_fields} ) { $fields || die q{must submit some 'fields' with with_fields}; my @got = $self->all_forms_with_fields(keys %{$fields}); - die "There is no form with the requested fields" if not @got; + $self->die("There is no form with the requested fields") if not @got; push @filtered_sets, \@got; } if ( my $form_number = $args{form_number} ) { my $got = $self->form_number( $form_number ); - die "There is no form numbered $form_number" if not $got; + $self->die("There is no form numbered $form_number") if not $got; push @filtered_sets, [ $got ]; } if ( my $form_name = $args{form_name} ) { my @got = $self->all_forms_with( name => $form_name ); - die qq{There is no form named "$form_name"} if not @got; + $self->die(qq{There is no form named "$form_name"}) if not @got; push @filtered_sets, \@got; } if ( my $form_id = $args{form_id} ) { my @got = $self->all_forms_with( id => $form_id ); - $self->warn(qq{ There is no form with ID "$form_id"}) if not @got; + $self->die(qq{There is no form with ID "$form_id"}) if not @got; push @filtered_sets, \@got; } @@ -1074,10 +1073,10 @@ my $expected_count = scalar @filtered_sets; my @matched = grep { $c{$_} == $expected_count } keys %c; if (not @matched) { - die "There is no form that satisfies all the criteria"; + $self->die('There is no form that satisfies all the criteria'); } if (@matched > 1) { - die "More than one form satisfies all the criteria"; + $self->die('More than one form satisfies all the criteria'); } $self->{current_form} = $matched[0]; } @@ -1687,7 +1686,7 @@ =head1 VERSION -version 1.94 +version 1.95 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/script/mech-dump new/WWW-Mechanize-1.95/script/mech-dump --- old/WWW-Mechanize-1.94/script/mech-dump 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/script/mech-dump 2019-10-28 14:07:53.000000000 +0100 @@ -131,7 +131,7 @@ =head1 VERSION -version 1.94 +version 1.95 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/t/00-report-prereqs.dd new/WWW-Mechanize-1.95/t/00-report-prereqs.dd --- old/WWW-Mechanize-1.94/t/00-report-prereqs.dd 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/t/00-report-prereqs.dd 2019-10-28 14:07:53.000000000 +0100 @@ -22,6 +22,7 @@ 'Perl::Tidy' => '20180220', 'Pod::Coverage::TrustPod' => '0', 'Test::Code::TidyAll' => '0.50', + 'Test::Memory::Cycle' => '1.06', 'Test::More' => '0.88', 'Test::Needs' => '0', 'Test::Pod' => '1.41', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/t/find_inputs.html new/WWW-Mechanize-1.95/t/find_inputs.html --- old/WWW-Mechanize-1.94/t/find_inputs.html 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/t/find_inputs.html 2019-10-28 14:07:53.000000000 +0100 @@ -3,15 +3,15 @@ <form action="http://localhost/" method="post" enctype="multipart/form-data" name="1st_form"> <input type="text" name="1a" /> - <input type="IMAGE" name="submit1" value="Submit" label="Sumbit" /> - <input type="submit" name="submit2" value="Submit" label="Sumbit" /> + <input type="IMAGE" name="submit1" value="Submit" label="Submit" /> + <input type="submit" name="submit2" value="Submit" label="Submit" /> </form> <form action="http://localhost/" method="post" name="2nd_form"> <input type="text" name="YourMom" /> <input type="text" name="opt[2]" /> Like in PHP! <input type="text" name="1b" /> - <input type="SubMit" name="submit" value="Submit" label="Sumbit" /> + <input type="SubMit" name="submit" value="Submit" label="Submit" /> </form> <form action="http://localhost/" method="post" name="3rd_form"> @@ -19,7 +19,7 @@ <input type="text" name="YourDad" /> <input type="text" name="YourSister" /> <input type="text" name="YourSister" /> - <input type="SubMit" name="submit" value="Submit" label="Sumbit" /> + <input type="SubMit" name="submit" value="Submit" label="Submit" /> </form> </body> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/t/form_with_fields.html new/WWW-Mechanize-1.95/t/form_with_fields.html --- old/WWW-Mechanize-1.94/t/form_with_fields.html 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/t/form_with_fields.html 2019-10-28 14:07:53.000000000 +0100 @@ -4,40 +4,40 @@ <form action="http://localhost/" method="post" enctype="multipart/form-data" name="1st_form"> <input type="text" name="1a" /> <input type="text" name="1b" /> - <input type="Submit" name="submit" value="Submit" label="Sumbit" /> + <input type="Submit" name="submit" value="Submit" label="Submit" /> </form> <form action="http://localhost/" method="post" name="2nd_form"> <input type="text" name="opt[2]" /> Like in PHP! <input type="text" name="1b" /> - <input type="Submit" name="submit" value="Submit" label="Sumbit" /> + <input type="Submit" name="submit" value="Submit" label="Submit" /> </form> <form action="http://localhost/" method="post" enctype="multipart/form-data" name="3rd_form_ambiguous"> <input type="text" name="3a" /> <input type="text" name="3b" /> - <input type="Submit" name="submit" value="Submit" label="Sumbit" /> + <input type="Submit" name="submit" value="Submit" label="Submit" /> </form> <form action="http://localhost/" method="post" enctype="multipart/form-data" name="3rd_form_ambiguous"> <input type="text" name="3c" /> <input type="text" name="3d" /> <input type="text" name="x" /> - <input type="Submit" name="submit" value="Submit" label="Sumbit" /> + <input type="Submit" name="submit" value="Submit" label="Submit" /> </form> <form action="http://localhost/" method="post" enctype="multipart/form-data" name="4th_form_1"> <input type="text" name="4a" /> <input type="text" name="4b" /> <input type="text" name="x" /> - <input type="Submit" name="submit" value="Submit" label="Sumbit" /> + <input type="Submit" name="submit" value="Submit" label="Submit" /> </form> <form action="http://localhost/" method="post" enctype="multipart/form-data" name="4th_form_2"> <input type="text" name="4a" /> <input type="text" name="4b" /> <input type="text" name="x" /> - <input type="Submit" name="submit" value="Submit" label="Sumbit" /> + <input type="Submit" name="submit" value="Submit" label="Submit" /> </form> </body> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/t/form_with_fields_verbose.html new/WWW-Mechanize-1.95/t/form_with_fields_verbose.html --- old/WWW-Mechanize-1.94/t/form_with_fields_verbose.html 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/t/form_with_fields_verbose.html 2019-10-28 14:07:53.000000000 +0100 @@ -4,8 +4,8 @@ <form action="http://localhost/" method="post" enctype="multipart/form-data" name="1st_form"> <input type="foobar" name="1a" /> <input type="text" name="1b" /> - <input type="Submit" name="submit" value="Submit" label="Sumbit" /> + <input type="Submit" name="submit" value="Submit" label="Submit" /> </form> </body> -</html> \ No newline at end of file +</html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/t/mech-dump/mech-dump.t new/WWW-Mechanize-1.95/t/mech-dump/mech-dump.t --- old/WWW-Mechanize-1.94/t/mech-dump/mech-dump.t 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/t/mech-dump/mech-dump.t 2019-10-28 14:07:53.000000000 +0100 @@ -14,9 +14,9 @@ plan skip_all => 'Not installing mech-dump' if -e File::Spec->catfile( qw( t SKIP-MECH-DUMP ) ); plan tests => 4; -my $exe = File::Spec->catfile( qw( blib script mech-dump ) ); +my $exe = File::Spec->catfile( qw( script mech-dump ) ); if ( $^O eq 'VMS' ) { - $exe = qq[mcr $^X "-mblib" $exe]; + $exe = qq[mcr $^X -Ilib $exe]; } # Simply use a file: uri instead of the filename to make this test @@ -25,7 +25,7 @@ my $perl; $perl = $1 if $^X =~ /^(.+)$/; -my $command = "$perl -Mblib $exe --forms $source"; +my $command = "$perl -Ilib $exe --forms $source"; my $actual = `$command`; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/t/submit_form.t new/WWW-Mechanize-1.95/t/submit_form.t --- old/WWW-Mechanize-1.94/t/submit_form.t 1970-01-01 01:00:00.000000000 +0100 +++ new/WWW-Mechanize-1.95/t/submit_form.t 2019-10-28 14:07:53.000000000 +0100 @@ -0,0 +1,94 @@ +#!perl + +use warnings; +use strict; + +use Test::More; +use Test::Fatal; +use Test::Warnings ':all'; +use URI::file (); +use WWW::Mechanize (); + +my $mech = WWW::Mechanize->new( cookie_jar => undef, autocheck => 0 ); +my $uri = URI::file->new_abs('t/form_with_fields.html')->as_string; + +$mech->get($uri); + +{ + $mech->get($uri); + like( + exception { + $mech->submit_form( + form_id => 'i-do-not-exist', + ); + }, + qr/There is no form with ID "i-do-not-exist"/, + 'submit_form with no match on form_id', + ); +} + +{ + $mech->get($uri); + like( + exception { + $mech->submit_form( + form_thing => 'i-do-not-exist', + ); + }, + qr/Unknown submit_form parameter "form_thing"/, + 'submit_form with invalid arg', + ); +} + +{ + $mech->get($uri); + like( + exception { + $mech->submit_form( + form_number => 99, + ); + }, + qr/There is no form numbered 99/, + 'submit_form with invalid form number', + ); +} +{ + $mech->get($uri); + like( + exception { + $mech->submit_form( + form_name => 99, + ); + }, + qr/There is no form named "99"/, + 'submit_form with invalid form name', + ); +} + +{ + $mech->get($uri); + like( + exception { + $mech->submit_form( + with_fields => [ 'foo', 'bar' ], + ); + }, + qr/with_fields arg to submit_form must be a hashref/, + 'submit_form with invalid arg value for with_fields', + ); +} + +{ + $mech->get($uri); + like( + exception { + $mech->submit_form( + fields => [ 'foo', 'bar' ], + ); + }, + qr/fields arg to submit_form must be a hashref/, + 'submit_form with invalid arg value for fields', + ); +} + +done_testing(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/t/tick.html new/WWW-Mechanize-1.95/t/tick.html --- old/WWW-Mechanize-1.94/t/tick.html 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/t/tick.html 2019-10-28 14:07:52.000000000 +0100 @@ -8,7 +8,7 @@ <input type="checkbox" name="foo" value="wibble" /> Wibble<br /> <input type="checkbox" name="foo" value="foo" /> Foo<br /> -<input type="Submit" name="submit" value="Submit" label="Sumbit" /> +<input type="Submit" name="submit" value="Submit" label="Submit" /> </form> </body> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/WWW-Mechanize-1.94/t/upload.html new/WWW-Mechanize-1.95/t/upload.html --- old/WWW-Mechanize-1.94/t/upload.html 2019-10-10 15:12:38.000000000 +0200 +++ new/WWW-Mechanize-1.95/t/upload.html 2019-10-28 14:07:53.000000000 +0100 @@ -4,7 +4,7 @@ <form action="http://localhost/" method="post" enctype="multipart/form-data"> <input type="file" name="upload" value="MANIFEST" /> -<input type="Submit" name="submit" value="Submit" label="Sumbit" /> +<input type="Submit" name="submit" value="Submit" label="Submit" /> </form> </body>
