Skip to content

Commit

Permalink
v2.10
Browse files Browse the repository at this point in the history
    [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)
  • Loading branch information
oalders committed Jul 4, 2022
1 parent ebffa3f commit 7e877ca
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Revision history for WWW::Mechanize

{{$NEXT}}
2.10 2022-07-04 21:06:13Z

[ENHANCEMENTS]
- Added form_action($action) to look up forms by regex matching $action (GH#19)
Expand Down
23 changes: 12 additions & 11 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down Expand Up @@ -508,7 +508,7 @@
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
"git_version" : "2.36.1",
"git_version" : "2.37.0",
"repo_root" : "."
}
},
Expand All @@ -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",
Expand Down Expand Up @@ -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" : {
Expand All @@ -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" : {
Expand Down Expand Up @@ -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" : {
Expand All @@ -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" : "."
}
},
Expand Down Expand Up @@ -923,6 +923,7 @@
"Kirrily 'Skud' Robert <[email protected]>",
"Kivanc Yazan <[email protected]>",
"Lars D\u026a\u1d07\u1d04\u1d0b\u1d0f\u1d21 \u8fea\u62c9\u65af <[email protected]>",
"Mark Leighton Fisher <[email protected]>",
"Mark Stosberg <[email protected]>",
"Martin H. Sluka <[email protected]>",
"Matthew Chae <[email protected]>",
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WWW::Mechanize - Handy web browsing in a Perl object

# VERSION

version 2.09
version 2.10

# SYNOPSIS

Expand Down Expand Up @@ -844,6 +844,19 @@ Emits a warning and returns undef if no form is found.

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
Expand Down Expand Up @@ -905,7 +918,8 @@ All matching forms (perhaps none) are returned as a list of [HTML::Form](https:/
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.

Expand Down

0 comments on commit 7e877ca

Please sign in to comment.