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

NAME

Test::Run::Straps - analyse the test results by using TAP::Parser.

METHODS

my $strap = Test::Run::Straps->new();

Initialize a new strap.

$strap->_inc_seen_header()

Increment the _seen_header field. Used by Test::Run::Core.

$self->_handle_event()

Handles the current event according to the list of types in the cascade. It checks each type and if matches calls the appropriate _handle_${type}_event callback. Returns the type of the event that matched.

my $results = $self->analyze( $name, \@output_lines)

Analyzes the output @output_lines of a given test, to which the name $name is assigned. Returns the results $results of the test - an object of type Test::Run::Straps::StrapsTotalsObj .

@output_lines should be the output of the test including newlines.

$strap->analyze_fh()

Analyzes a TAP stream based on the TAP::Parser from $self->_create_parser().

$strap->analyze_file($filename)

Runs and analyzes the program file $filename. It will also use it as the name in the final report.

$strap->_filtered_INC(\@inc)

Filters @inc so it will fit into the environment of some operating systems which limit it (such as VMS).

[@filtered] = $strap->_clean_switches(\@switches)

Returns trimmed and blank-filtered switches from the user.

$self->_command()

Returns the command (the command-line executable) that will run the test along with _switches().

Normally returns $^X, but can be over-rided using the Test_Interpreter accessor.

This method can be over-rided in custom test harnesses in order to run using different TAP producers than Perl.

$strap->_restore_PERL5LIB()

Restores the old value of PERL5LIB. This is necessary on VMS. Does not do anything on other platforms.

$self->_reset_file_state()

Reset some fields so it will be ready to process the next file.

$self->_switches()

Calculates and returns the switches necessary to run the test.

local $ENV{PERL5LIB} = $self->_INC2PERL5LIB()

Takes the calculated library paths for running the test scripts and returns it as something that one can assign to the PERL5LIB environment variable.

LICENSE

This file is licensed under the MIT X11 License:

http://www.opensource.org/licenses/mit-license.php

AUTHOR

Shlomi Fish <shlomif@iglu.org.il>