The uploaded file

    TAP-Harness-Archive-0.03.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/W/WO/WONKO/TAP-Harness-Archive-0.03.tar.gz
  size: 5995 bytes
   md5: 5a92a2ae5b434692295555a68146703d

The biggest change in this release is the removal of Archive::Builder and
Archive::Extract as dependencies since they had soooo many other dependencies
that our chance of failure on install we greater.

SYNOPSIS
        use TAP::Harness::Archive;
        my $harness = TAP::Harness::Archive->new(\%args);
        $harness->runtests(@tests);

DESCRIPTION
    This module is a direct subclass of TAP::Harness and behaves in exactly
    the same way except for one detail. In addition to outputting a running
    progress of the tests and an ending summary it can also capture all of
    the raw TAP from the individual test files or streams into an archive
    file (".tar" or ".tar.gz").

METHODS
    All methods are exactly the same as our base TAP::Harness except for the
    following.

  new
    In addition to the options that TAP::Harness allow to this method, we
    also allow the following:

    archive
        This is the name of the archive file to generate. We use
        Archive::Tar in the background so we only support ".tar" and
        ".tar.gz" archive file formats.

  runtests
    Takes the same arguments as TAP::Harness's version and returns the same
    thing (a TAP::Parser::Aggregator object). The only difference is that in
    addition to the normal test running and progress output we also create
    the TAP Archive when it's all done.

  aggregator_from_archive
    This class method will return a TAP::Parser::Aggregator object when
    given a TAP Archive to open and parse. It's pretty much the reverse of
    creating a TAP Archive from using "new" and "runtests".

    It takes a hash of arguments which are as follows:

    archive
        The path to the archive file. This is required.

    parser_callbacks
        This is a hash ref containing callbacks for the TAP::Parser objects
        that are created while parsing the TAP files. See the TAP::Parser
        documentation for details about these callbacks.

    made_parser_callback
        This callback is executed every time a new TAP::Parser object is
        created. It will be passed the new parser object and the name of the
        file to be parsed.

    meta_yaml_callback
        This is a subroutine that will be called if we find and parse a YAML
        file containing meta information about the test run in the archive.
        The structure of the YAML file will be passed in as an argument.

        my $aggregator = TAP::Harness::Archive->aggregator_from_archive(
            {
                archive          => 'my_tests.tar.gz',
                parser_callbacks => {
                    plan    => sub { warn "Nice to see you plan ahead..." },
                    unknown => sub { warn "Your TAP is bad!" },
                },
            }
        );

-- 
Michael Peters
Developer
Plus Three, LP

Reply via email to