Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-WWW-Mechanize for 
openSUSE:Factory checked in at 2022-07-14 16:33:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-WWW-Mechanize (Old)
 and      /work/SRC/openSUSE:Factory/.perl-WWW-Mechanize.new.1523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-WWW-Mechanize"

Thu Jul 14 16:33:22 2022 rev:40 rq:988973 version:2.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-WWW-Mechanize/perl-WWW-Mechanize.changes    
2022-06-21 17:15:23.066343964 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-WWW-Mechanize.new.1523/perl-WWW-Mechanize.changes
  2022-07-14 16:33:29.044583531 +0200
@@ -1,0 +2,16 @@
+Tue Jul  5 03:08:38 UTC 2022 - Tina M??ller <timueller+p...@suse.de>
+
+- updated to 2.10
+   see /usr/share/doc/packages/perl-WWW-Mechanize/Changes
+
+  2.10      2022-07-04 21:06:13Z
+
+      [ENHANCEMENTS]
+      - Added form_action($action) to look up forms by regex matching $action 
(GH#19)
+        (Mark Leighton Fisher and Julien Fiegehenn)
+
+      [DOCUMENTATION]
+      - Explain that file URIs need url encoding (GH#329) (Julien Fiegehenn and
+        ????????? Dan Jacobson)
+
+-------------------------------------------------------------------

Old:
----
  WWW-Mechanize-2.09.tar.gz

New:
----
  WWW-Mechanize-2.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-WWW-Mechanize.spec ++++++
--- /var/tmp/diff_new_pack.jWTUK8/_old  2022-07-14 16:33:29.460583921 +0200
+++ /var/tmp/diff_new_pack.jWTUK8/_new  2022-07-14 16:33:29.464583925 +0200
@@ -18,7 +18,7 @@
 
 %define cpan_name WWW-Mechanize
 Name:           perl-WWW-Mechanize
-Version:        2.09
+Version:        2.10
 Release:        0
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Handy web browsing in a Perl object

++++++ WWW-Mechanize-2.09.tar.gz -> WWW-Mechanize-2.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/CONTRIBUTORS 
new/WWW-Mechanize-2.10/CONTRIBUTORS
--- old/WWW-Mechanize-2.09/CONTRIBUTORS 2022-06-14 16:20:11.000000000 +0200
+++ new/WWW-Mechanize-2.10/CONTRIBUTORS 2022-07-04 23:06:21.000000000 +0200
@@ -35,6 +35,7 @@
     * Kirrily 'Skud' Robert
     * Kivanc Yazan
     * Lars D????????????????? ?????????
+    * Mark Leighton Fisher
     * Mark Stosberg
     * Martin H. Sluka
     * Matthew Chae
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/Changes 
new/WWW-Mechanize-2.10/Changes
--- old/WWW-Mechanize-2.09/Changes      2022-06-14 16:20:11.000000000 +0200
+++ new/WWW-Mechanize-2.10/Changes      2022-07-04 23:06:21.000000000 +0200
@@ -1,5 +1,15 @@
 Revision history for WWW::Mechanize
 
+2.10      2022-07-04 21:06:13Z
+
+    [ENHANCEMENTS]
+    - Added form_action($action) to look up forms by regex matching $action 
(GH#19)
+      (Mark Leighton Fisher and Julien Fiegehenn)
+
+    [DOCUMENTATION]
+    - Explain that file URIs need url encoding (GH#329) (Julien Fiegehenn and
+      ????????? Dan Jacobson)
+
 2.09      2022-06-14 14:20:04Z
     [DOCUMENTATION]
     - Various POD fixes (Julien Fiegehenn)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/META.json 
new/WWW-Mechanize-2.10/META.json
--- old/WWW-Mechanize-2.09/META.json    2022-06-14 16:20:11.000000000 +0200
+++ new/WWW-Mechanize-2.10/META.json    2022-07-04 23:06:21.000000000 +0200
@@ -119,15 +119,15 @@
    "provides" : {
       "WWW::Mechanize" : {
          "file" : "lib/WWW/Mechanize.pm",
-         "version" : "2.09"
+         "version" : "2.10"
       },
       "WWW::Mechanize::Image" : {
          "file" : "lib/WWW/Mechanize/Image.pm",
-         "version" : "2.09"
+         "version" : "2.10"
       },
       "WWW::Mechanize::Link" : {
          "file" : "lib/WWW/Mechanize/Link.pm",
-         "version" : "2.09"
+         "version" : "2.10"
       }
    },
    "release_status" : "stable",
@@ -142,7 +142,7 @@
          "web" : "https://github.com/libwww-perl/WWW-Mechanize";
       }
    },
-   "version" : "2.09",
+   "version" : "2.10",
    "x_Dist_Zilla" : {
       "perl" : {
          "version" : "5.036000"
@@ -508,7 +508,7 @@
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.36.1",
+                  "git_version" : "2.37.0",
                   "repo_root" : "."
                }
             },
@@ -519,7 +519,7 @@
             "class" : "Dist::Zilla::Plugin::Git::Contributors",
             "config" : {
                "Dist::Zilla::Plugin::Git::Contributors" : {
-                  "git_version" : "2.36.1",
+                  "git_version" : "2.37.0",
                   "include_authors" : 0,
                   "include_releaser" : 1,
                   "order_by" : "name",
@@ -639,7 +639,7 @@
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.36.1",
+                  "git_version" : "2.37.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
@@ -656,12 +656,12 @@
                   "branch" : null,
                   "changelog" : "Changes",
                   "signed" : 0,
-                  "tag" : "v2.09",
+                  "tag" : "v2.10",
                   "tag_format" : "v%V",
                   "tag_message" : "v%V"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.36.1",
+                  "git_version" : "2.37.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
@@ -712,7 +712,7 @@
                   "changelog" : "Changes"
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.36.1",
+                  "git_version" : "2.37.0",
                   "repo_root" : "."
                },
                "Dist::Zilla::Role::Git::StringFormatter" : {
@@ -732,7 +732,7 @@
                   "remotes_must_exist" : 1
                },
                "Dist::Zilla::Role::Git::Repo" : {
-                  "git_version" : "2.36.1",
+                  "git_version" : "2.37.0",
                   "repo_root" : "."
                }
             },
@@ -923,6 +923,7 @@
       "Kirrily 'Skud' Robert <s...@infotrope.net>",
       "Kivanc Yazan <kivancya...@gmail.com>",
       "Lars D\u026a\u1d07\u1d04\u1d0b\u1d0f\u1d21 \u8fea\u62c9\u65af 
<da...@cpan.org>",
+      "Mark Leighton Fisher <fishe...@purdue.edu>",
       "Mark Stosberg <m...@summersault.com>",
       "Martin H. Sluka <mar...@sluka.de>",
       "Matthew Chae <msc...@cpan.org>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/META.yml 
new/WWW-Mechanize-2.10/META.yml
--- old/WWW-Mechanize-2.09/META.yml     2022-06-14 16:20:11.000000000 +0200
+++ new/WWW-Mechanize-2.10/META.yml     2022-07-04 23:06:21.000000000 +0200
@@ -44,13 +44,13 @@
 provides:
   WWW::Mechanize:
     file: lib/WWW/Mechanize.pm
-    version: '2.09'
+    version: '2.10'
   WWW::Mechanize::Image:
     file: lib/WWW/Mechanize/Image.pm
-    version: '2.09'
+    version: '2.10'
   WWW::Mechanize::Link:
     file: lib/WWW/Mechanize/Link.pm
-    version: '2.09'
+    version: '2.10'
 recommends:
   Compress::Zlib: '0'
 requires:
@@ -77,7 +77,7 @@
   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: '2.09'
+version: '2.10'
 x_Dist_Zilla:
   perl:
     version: '5.036000'
@@ -362,7 +362,7 @@
           allow_dirty_match: []
           changelog: Changes
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.36.1
+          git_version: 2.37.0
           repo_root: .
       name: '@Author::OALDERS/Git::Check'
       version: '2.048'
@@ -370,7 +370,7 @@
       class: Dist::Zilla::Plugin::Git::Contributors
       config:
         Dist::Zilla::Plugin::Git::Contributors:
-          git_version: 2.36.1
+          git_version: 2.37.0
           include_authors: 0
           include_releaser: 1
           order_by: name
@@ -462,7 +462,7 @@
           allow_dirty_match: []
           changelog: Changes
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.36.1
+          git_version: 2.37.0
           repo_root: .
         Dist::Zilla::Role::Git::StringFormatter:
           time_zone: local
@@ -475,11 +475,11 @@
           branch: ~
           changelog: Changes
           signed: 0
-          tag: v2.09
+          tag: v2.10
           tag_format: v%V
           tag_message: v%V
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.36.1
+          git_version: 2.37.0
           repo_root: .
         Dist::Zilla::Role::Git::StringFormatter:
           time_zone: local
@@ -517,7 +517,7 @@
             - (?^:^lib/.*\.pm$)
           changelog: Changes
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.36.1
+          git_version: 2.37.0
           repo_root: .
         Dist::Zilla::Role::Git::StringFormatter:
           time_zone: local
@@ -531,7 +531,7 @@
             - origin
           remotes_must_exist: 1
         Dist::Zilla::Role::Git::Repo:
-          git_version: 2.36.1
+          git_version: 2.37.0
           repo_root: .
       name: '@Author::OALDERS/Git::Push'
       version: '2.048'
@@ -680,6 +680,7 @@
   - "Kirrily 'Skud' Robert <s...@infotrope.net>"
   - 'Kivanc Yazan <kivancya...@gmail.com>'
   - 'Lars D????????????????? ????????? <da...@cpan.org>'
+  - 'Mark Leighton Fisher <fishe...@purdue.edu>'
   - 'Mark Stosberg <m...@summersault.com>'
   - 'Martin H. Sluka <mar...@sluka.de>'
   - 'Matthew Chae <msc...@cpan.org>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/Makefile.PL 
new/WWW-Mechanize-2.10/Makefile.PL
--- old/WWW-Mechanize-2.09/Makefile.PL  2022-06-14 16:20:11.000000000 +0200
+++ new/WWW-Mechanize-2.10/Makefile.PL  2022-07-04 23:06:21.000000000 +0200
@@ -65,7 +65,7 @@
     "bytes" => 0,
     "lib" => 0
   },
-  "VERSION" => "2.09",
+  "VERSION" => "2.10",
   "test" => {
     "TESTS" => "t/*.t t/local/*.t t/mech-dump/*.t"
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/README.md 
new/WWW-Mechanize-2.10/README.md
--- old/WWW-Mechanize-2.09/README.md    2022-06-14 16:20:11.000000000 +0200
+++ new/WWW-Mechanize-2.10/README.md    2022-07-04 23:06:21.000000000 +0200
@@ -4,7 +4,7 @@
 
 # VERSION
 
-version 2.09
+version 2.10
 
 # SYNOPSIS
 
@@ -844,6 +844,19 @@
 
 The first form is number 1, not zero.
 
+## $mech->form\_action( $action )
+
+Selects a form by action, using a regex containing `$action`.
+If there is more than one form on the page matching that action,
+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%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)`.
+
+Returns `undef` if no form is found.
+
 ## $mech->form\_name( $name )
 
 Selects a form by name.  If there is more than one form on the page
@@ -905,7 +918,8 @@
 Searches for forms with arbitrary attribute/value pairs within the &lt;form>
 tag.
 (Currently does not work for attribute `action` due to implementation details
-of [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm).)
+of [HTML::Form](https://metacpan.org/pod/HTML%3A%3AForm). Use 
`[form_action()](#mech-form_action-action)`
+instead.)
 When given more than one pair, all criteria must match.
 Using `undef` as value means that the attribute in question must not be 
present.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/lib/WWW/Mechanize/Cookbook.pod 
new/WWW-Mechanize-2.10/lib/WWW/Mechanize/Cookbook.pod
--- old/WWW-Mechanize-2.09/lib/WWW/Mechanize/Cookbook.pod       2022-06-14 
16:20:12.000000000 +0200
+++ new/WWW-Mechanize-2.10/lib/WWW/Mechanize/Cookbook.pod       2022-07-04 
23:06:21.000000000 +0200
@@ -13,7 +13,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 INTRODUCTION
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/lib/WWW/Mechanize/Examples.pod 
new/WWW-Mechanize-2.10/lib/WWW/Mechanize/Examples.pod
--- old/WWW-Mechanize-2.09/lib/WWW/Mechanize/Examples.pod       2022-06-14 
16:20:12.000000000 +0200
+++ new/WWW-Mechanize-2.10/lib/WWW/Mechanize/Examples.pod       2022-07-04 
23:06:21.000000000 +0200
@@ -13,7 +13,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/lib/WWW/Mechanize/FAQ.pod 
new/WWW-Mechanize-2.10/lib/WWW/Mechanize/FAQ.pod
--- old/WWW-Mechanize-2.09/lib/WWW/Mechanize/FAQ.pod    2022-06-14 
16:20:12.000000000 +0200
+++ new/WWW-Mechanize-2.10/lib/WWW/Mechanize/FAQ.pod    2022-07-04 
23:06:21.000000000 +0200
@@ -13,7 +13,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 How to get help with WWW::Mechanize
 
@@ -325,6 +325,14 @@
 
 You need either L<IO::Socket::SSL> or L<Crypt::SSLeay> installed.
 
+=head2 Why don't file:// URLs to files with a question mark in the name work?
+
+If you have a local file named C<how-are-you?>, the URL for that file is
+C<file:how-are-you%3f>. That's because L<URI::file> is required to be
+url-encoded, just like any URL pointing to somewhere on the internet has to be
+if it contains reserved characters such as C<?>, C</> or C<@>. This is 
specified
+in RFC 3986. See L<URI::Escape> for a full list of reserved characters.
+
 =head2 Why do I get "Input 'fieldname' is readonly"?
 
 You're trying to change the value of a hidden field and you have
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/lib/WWW/Mechanize/Image.pm 
new/WWW-Mechanize-2.10/lib/WWW/Mechanize/Image.pm
--- old/WWW-Mechanize-2.09/lib/WWW/Mechanize/Image.pm   2022-06-14 
16:20:12.000000000 +0200
+++ new/WWW-Mechanize-2.10/lib/WWW/Mechanize/Image.pm   2022-07-04 
23:06:21.000000000 +0200
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '2.09';
+our $VERSION = '2.10';
 
 #ABSTRACT: Image object for WWW::Mechanize
 
@@ -69,7 +69,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/lib/WWW/Mechanize/Link.pm 
new/WWW-Mechanize-2.10/lib/WWW/Mechanize/Link.pm
--- old/WWW-Mechanize-2.09/lib/WWW/Mechanize/Link.pm    2022-06-14 
16:20:12.000000000 +0200
+++ new/WWW-Mechanize-2.10/lib/WWW/Mechanize/Link.pm    2022-07-04 
23:06:21.000000000 +0200
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '2.09';
+our $VERSION = '2.10';
 
 #ABSTRACT: Link object for WWW::Mechanize
 
@@ -65,7 +65,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/lib/WWW/Mechanize.pm 
new/WWW-Mechanize-2.10/lib/WWW/Mechanize.pm
--- old/WWW-Mechanize-2.09/lib/WWW/Mechanize.pm 2022-06-14 16:20:11.000000000 
+0200
+++ new/WWW-Mechanize-2.10/lib/WWW/Mechanize.pm 2022-07-04 23:06:21.000000000 
+0200
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '2.09';
+our $VERSION = '2.10';
 
 use Tie::RefHash;
 use HTTP::Request 1.30;
@@ -670,6 +670,24 @@
 }
 
 
+sub form_action {
+    my ($self, $action) = @_;
+
+    my $temp;
+    my @matches = grep {defined($temp = $_->action) and ($temp =~ 
m/$action/msx) } $self->forms;
+
+    my $nmatches = @matches;
+    if ( $nmatches > 0 ) {
+        if ( $nmatches > 1 ) {
+            $self->warn( "There are $nmatches forms with action matching 
$action. The first one was used." )
+        }
+        return $self->{current_form} = $matches[0];
+    }
+
+    return;
+}
+
+
 sub form_name {
     my ($self, $form) = @_;
     return $self->form_with( name => $form );
@@ -1800,7 +1818,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 
@@ -2706,6 +2724,19 @@
 
 The first form is number 1, not zero.
 
+=head2 $mech->form_action( $action )
+
+Selects a form by action, using a regex containing C<$action>.
+If there is more than one form on the page matching that action,
+then the first one is used, and a warning is generated.
+
+If it is found, the form is returned as an L<HTML::Form> object and
+set internally for later use with Mech's form methods such as
+C<L<< field()|/"$mech->field( $name, $value, $number )" >>> and
+C<L<< click()|/"$mech->click( $button [, $x, $y] )" >>>.
+
+Returns C<undef> if no form is found.
+
 =head2 $mech->form_name( $name )
 
 Selects a form by name.  If there is more than one form on the page
@@ -2767,7 +2798,8 @@
 Searches for forms with arbitrary attribute/value pairs within the 
E<lt>formE<gt>
 tag.
 (Currently does not work for attribute C<action> due to implementation details
-of L<HTML::Form>.)
+of L<HTML::Form>. Use C<L<< form_action()|/"$mech->form_action( $action )" >>>
+instead.)
 When given more than one pair, all criteria must match.
 Using C<undef> as value means that the attribute in question must not be 
present.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/script/mech-dump 
new/WWW-Mechanize-2.10/script/mech-dump
--- old/WWW-Mechanize-2.09/script/mech-dump     2022-06-14 16:20:11.000000000 
+0200
+++ new/WWW-Mechanize-2.10/script/mech-dump     2022-07-04 23:06:21.000000000 
+0200
@@ -131,7 +131,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/t/local/failure.t 
new/WWW-Mechanize-2.10/t/local/failure.t
--- old/WWW-Mechanize-2.09/t/local/failure.t    2022-06-14 16:20:11.000000000 
+0200
+++ new/WWW-Mechanize-2.10/t/local/failure.t    2022-07-04 23:06:21.000000000 
+0200
@@ -38,7 +38,7 @@
     my @links = $mech->links;
     is( scalar @links, 10, '10 links, please' );
     my @forms = $mech->forms;
-    is( scalar @forms, 2, 'Two form' );
+    is( scalar @forms, 3, 'Many forms' );
 }
 
 BAD_PAGE: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/t/local/form.t 
new/WWW-Mechanize-2.10/t/local/form.t
--- old/WWW-Mechanize-2.09/t/local/form.t       2022-06-14 16:20:11.000000000 
+0200
+++ new/WWW-Mechanize-2.10/t/local/form.t       2022-07-04 23:06:21.000000000 
+0200
@@ -1,6 +1,6 @@
 use warnings;
 use strict;
-use Test::More tests => 21;
+use Test::More;
 
 use lib 't/local';
 use LocalServer;
@@ -18,41 +18,61 @@
 isa_ok( $mech, 'WWW::Mechanize' ) or die;
 $mech->quiet(1);
 $mech->get($server->url);
-ok( $mech->success, 'Got a page' ) or die;
-is( $mech->uri, $server->url, 'Got page' );
+ok( $mech->success, 'got a page' ) or die;
+is( $mech->uri, $server->url, 'got correct page' );
 
 my ($form, $number) = $mech->form_number(1);
-isa_ok( $form, 'HTML::Form', 'Can select the first form in list context call');
-is( $number, 1, 'Form number is correct' );
+isa_ok( $form, 'HTML::Form', 'form_number - can select the first form in list 
context call');
+is( $number, 1, 'form_number - form number is correct' );
 
 my $form_number_1 = $mech->form_number(1);
-isa_ok( $form_number_1, 'HTML::Form', 'Can select the first form');
-is( $mech->current_form(), $mech->{forms}->[0], 'Set the form attribute' );
+isa_ok( $form_number_1, 'HTML::Form', 'form_number - can select the first 
form');
+is( $mech->current_form(), $mech->{forms}->[0], 'form_number - set the form 
attribute' );
 
-ok( !$mech->form_number(99), 'cannot select the 99th form');
-is( $mech->current_form(), $mech->{forms}->[0], 'Form is still set to 1' );
+ok( !$mech->form_number(99), 'form_number - cannot select the 99th form');
+is( $mech->current_form(), $mech->{forms}->[0], 'form_number - form is still 
set to 1' );
 
 my $form_name_f = $mech->form_name('f');
-isa_ok( $form_name_f, 'HTML::Form', 'Can select the form' );
-ok( !$mech->form_name('bargle-snark'), 'cannot select non-existent form' );
+isa_ok( $form_name_f, 'HTML::Form', 'form_name - can select the form' );
+ok( !$mech->form_name('bargle-snark'), 'form_name - cannot select non-existent 
form' );
 
 my $form_id_pounder = $mech->form_id('pounder');
-isa_ok( $form_id_pounder, 'HTML::Form', 'Can select the form' );
-ok( !$mech->form_id('bargle-snark'), 'cannot select non-existent form' );
+isa_ok( $form_id_pounder, 'HTML::Form', 'form_id - can select the form' );
+ok( !$mech->form_id('bargle-snark'), 'form_id - cannot select non-existent 
form' );
 
 my $form_with = $mech->form_with( class => 'test', id => undef );
-isa_ok( $form_with, 'HTML::Form', 'Can select the form without id' );
+isa_ok( $form_with, 'HTML::Form', 'form_with - can select the form without id' 
);
 is( $mech->current_form, $form_number_1,
-    'Form without id is now the current form' );
+    'form_with - form without id is now the current form' );
 
 is( scalar @warnings, 0, 'no warnings so far' );
 $mech->quiet(0);
 $form_with = $mech->form_with( class => 'test', foo => '', bar => undef );
-is( $form_with, $form_number_1, 'Can select form with ambiguous criteria' );
-is( scalar @warnings, 1, 'Got one warning' );
+is( $form_with, $form_number_1, 'form_with - can select form with ambiguous 
criteria' );
+is( scalar @warnings, 1, 'form_with - got one warning' );
 is(
     "@warnings",
     'There are 2 forms with no bar and class "test"'
       . ' and empty foo.  The first one was used.',
     'Got expected warning'
 );
+$mech->quiet(1);
+
+my $form_id_searchbox = $mech->form_action('google-cli');
+isa_ok( $form_id_searchbox, 'HTML::Form', 'form_action - can select the form' 
);
+ok( !$mech->form_action('bargle-snark'),
+    'form_action - cannot select non-existent form' );
+
+$mech->quiet(0);
+my $form_action = $mech->form_action('formsubmit');
+isa_ok( $form_action, 'HTML::Form', 'form_action - can select the form' );
+is( scalar @warnings, 2, 'form_actino - got one warning' );
+like(
+    $warnings[-1],
+    qr/with action matching/,
+    'form_action - got correct multiple-matching-forms warning'
+);
+$mech->quiet(1);
+
+
+done_testing;
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WWW-Mechanize-2.09/t/local/log-server 
new/WWW-Mechanize-2.10/t/local/log-server
--- old/WWW-Mechanize-2.09/t/local/log-server   2022-06-14 16:20:11.000000000 
+0200
+++ new/WWW-Mechanize-2.10/t/local/log-server   2022-07-04 23:06:21.000000000 
+0200
@@ -185,6 +185,9 @@
   <form id="pounder" action="/formsubmit" class="test" foo="">
     <input type="text" name="query" value="%s"/>
   </form>
+  <form id="searchbox" action="/google-cli">
+    <input type="text" name="query" value="%s"/>
+  </form>
 </p>
 </body>
 </html>

Reply via email to