The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::XHTML::Critic - Basic critique checks.

SYNOPSIS

    my $txw = Test::XHTML::Critic->new();

    $txw->validate($content);       # run compliance checks
    my $results = $txw->results();  # retrieve results

    $txw->clear();                  # clear all current errors and results
    $txw->errors();                 # all current errors reported
    $txw->errstr();                 # basic error message

    $txw->logfile($file);           # logfile for verbose messages
    $txw->logclean(1);              # 1 = overwrite, 0 = append (default)

DESCRIPTION

This module attempts to check content for deprecated elements or missing recommend elements. Some checks are based on W3C standards, while others are from recognised usability resources.

METHODS

Constructor

Enables test object to retain content, results and errors as appropriate.

new()

Creates and returns a Test::XHTML::Critic object.

Public Methods

validate(CONTENT)

Checks given content for basic compliance.

results()

Record results to log file (if given) and returns a hashref.

errors()

Returns all the current errors reported as XML::LibXML::Error objects.

errstr()

Returns all the current errors reported as a single string.

clear()

Clear all current errors and results.

logfile(FILE)

Set output log file for verbose messages.

logclean(STATE)

Set STATE to 1 (create/overwrite) or 0 (append - the default)

BUGS, PATCHES & FIXES

There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties, that is not explained within the POD documentation, please send bug reports and patches to barbie@cpan.org.

Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me.

SEE ALSO

HTML::TokeParser

AUTHOR

  Barbie, <barbie@cpan.org>
  for Miss Barbell Productions <http://www.missbarbell.co.uk>.

COPYRIGHT AND LICENSE

  Copyright (C) 2008-2015 Barbie for Miss Barbell Productions.

  This distribution is free software; you can redistribute it and/or
  modify it under the Artistic Licence v2.