App::SimpleScan::Cookbook

App::SimpleScan::Cookbook is a documentation-only module that describes how to use simple_scan.
Download

App::SimpleScan::Cookbook Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Joe McMahon and Yahoo!
  • Publisher web site:
  • http://search.cpan.org/~mcmahon/WWW-Mechanize-Pluggable-1.04/lib/WWW/Mechanize/Plugin/HelloWorld.pm

App::SimpleScan::Cookbook Tags


App::SimpleScan::Cookbook Description

App::SimpleScan::Cookbook is a documentation-only module that describes how to use simple_scan. App::SimpleScan::Cookbook is a documentation-only module that describes how to use simple_scan for some common Web testing problems.BASICSsimple_scan reads test specifications from standard input and generates Perl code based on these specifications. It can either execute them immediately, print them on standard output without executing them, or do both: execute them and then print the generated code on standard output.TEST SPECSTest specifications describe where the page is that you want to check, some content (in the form of a Perl regular expression) that you want look for whether or not it should be there and a comment about why you care.Matching non-ASCII Latin-1 charactersFirst: be sure that the non-ASCII character you're seeing on the screen is actually present in the HTML source. You could be looking at an HTML entity that gets rendered as the character in question. For instance a degree symbol is actually &xB0;.You can match a specific entity with its actual text: /&x0;/(Note that we've made sure that it will work whether the hex "digits" are upper or lowercase.) Or you can match an arbitrary entity: /&.*?;/This one will also match things like & and &brkbar; - with great power comes relative imprecision. There's a handy table of Latin-1 entities at http://www.ramsch.org/martin/uni/fmi-hp/iso8859-1.html.In some cases (e.g., Yahoo!'s fr.search search results), there will actually be non-Latin1 characters that are not HTML encoded. This is probably not good practice, but it still exists here and there. To deal with pages like this, copy and paste the exact text from a "view source" into the regex you want to use.Newer versions of simple_scan handle data smoothly without any special action on your part, even if the encoding's off a bit. Requirements: · WWW::Mechanize::Pluggable · Module::Pluggable · Test::WWW::Simple · Test::Differences · Scalar::Util · Getopt::Long · Regexp::Common · Text::Balanced · Perl


App::SimpleScan::Cookbook Related Software