App::SimpleScan::Plugin::LinkCheck

App::SimpleScan::Plugin::LinkCheck is a Perl module with link counting/presence/absence plugin.
Download

App::SimpleScan::Plugin::LinkCheck Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Joe McMahon
  • Publisher web site:
  • http://search.cpan.org/~mcmahon/Class-AutoPlug-0.02/lib/Class/AutoPlug/Pluggable.pm

App::SimpleScan::Plugin::LinkCheck Tags


App::SimpleScan::Plugin::LinkCheck Description

App::SimpleScan::Plugin::LinkCheck is a Perl module with link counting/presence/absence plugin. App::SimpleScan::Plugin::LinkCheck is a Perl module with link counting/presence/absence plugin.SYNOPSIS # After this plugin is installed: %%has_link 'My stuff' %%no_link 'Send email' # The has_link and no_link checks will run for every test spec. http://someplace.com /foo/ Y Got my page http://someplace.com/subpage /foo/ Y Got my subpage # Stop checking for the 'My stuff' link %%forget_link 'My stuff' # Now only the "no 'Send email' link' test will run. http://someplace.com/map /foo/ Y Get map page # More specific tests can be done: # The page will have exactly one 'home' link %%has_link 'Home' == 1 # The page will have a non-zero number of 'offsite' links. %%has_link 'offsite' > 0 http://someplace.com/links /foo/ Y Get links page # Now both these tests and the 'send email' test will run.Th Linkcheck plugin adds simple link counting and presence/absence checking pragmas to simple_scan. These pragmas are assertions; they will be run for every test spec occurring after the pragma(s) appear in the intput file.You can, for instance, assert that you do not want to see a link named 'Click here' anywhere in the pages referenced by the test specs in this test: %%no_link 'Click here' Additional test specs generated by variable substitution will each have the check made, so for example %%which bar baz quux http://< which >.foo.com /foo.com/ Y Fetch pagewould check for /foo.com/ on each of bar.foo.com, baz.foo.com, and quux.foo.com, and also check for zero links whose name is 'Click here' on each of these pages.Conversely, you can assert that a link must be present on each page you look at: %%has_link 'back'This means that a link named 'back' must appear on every page you fetch after this pragma occurs in the input.You may want to remove the condition for some pages in your tests; this can easily be done by 'forgetting' the link: %%forget_link 'back'The assertion has now been dropped, and will not be tested through the rest of the file. If you want to forget all of the currently-active link-count assertions, just use %%forget_all_linksand all of the link checks will stop.If you want to be more specific about the link counts, you can use the extended syntax for '%%has_link': %%has_link 'beta' >= 0 %%has_link 'up' == 2 %%has_link 'report_problems' != 1Note that you can use any of the numeric operators and a count for this. These work just like the other tests, in that they apply to every test spec following until either the end of the file, or a '%%forget_link' that drops them. Requirements: · Perl · App::SimpleScan


App::SimpleScan::Plugin::LinkCheck Related Software