kiwiroy / mojo-transaction-http-role-mechanize

Role::Tiny based role to mechanize Mojo a little
https://metacpan.org/release/Mojo-Transaction-HTTP-Role-Mechanize
1 stars 2 forks source link

New method extract_forms #7

Closed Tekki closed 5 years ago

Tekki commented 5 years ago

In Mechanize.pm I've moved the code that extracts the forms from the DOM to a new method extract_forms. I've tried several variants and for example was not sure for example if this method should have a selector or not. If we use this module to communicate with legacy applications we can imagine a lot of bad situations, like multiple forms on a page and tags without IDs. Maybe later we will add the possibility to call $tx->submit($form, '#button'). But for the moment I think we shouldn't make things too complicated if we have no real use case. Then I've added .perltidyrc from Mojolicious and tidied Mechanize.pm with it. Hope this is okay.

kiwiroy commented 5 years ago

@Tekki, nicely done.