Changes for version 0.54

  • THINGS THAT MIGHT BREAK YOUR CODE
    • See the enhancements on extract_links() and failures. Also, see the note about #2811 below.
  • ENHANCEMENTS
    • find_all_links() and find_link() can specify multiple text or url parameters, which will be anded together. Before, there was a pecking order in which parm took precedence, and any extras were ignored. To find the first link with text of "news" and with "cnn.com" in the URL, use:
      • $a->find_link( text => "news", url_regex => qr/cnn\.com/ );
      • Thanks to Greg Davies for the idea. (RT #2973)
    • extract_links() is now an internal-only method, named _extract_links(). If you're using it, don't. Use find_all_links() instead, which is more flexible.
    • Now, when there is a failure of some kind, certain fields like title, forms and links are cleared out. Before, you'd have leftover links from the previous page. I suspect that at least one person out there has been mistakenly relying on this behavior, and his code will now break, but that's a good thing. See t/failure.t for more.
  • FIXES
    • No longer tries to tech mech-forms if you're not installing it.
    • Fixed #2811: The definition of the link text contents did not match the documentation.
  • DOCUMENTATION
    • Added a sample CPAN search from Ed Silva.
    • Added link to the Perl Advent Calendar.

Documentation

Sample programs that use WWW::Mechanize

Modules

automate interaction with websites