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

NAME

TAP::Stream::Text - Create a TAP text object.

VERSION

version 0.44

SYNOPSIS

    my $tap = <<'END';
    ok 1 - some test
    ok 2 - another test
    1..2
    END
    
    my $text = TAP::Stream::Text->new(
        name => $what_this_tap_tested, # String
        text => $tap,
    );

DESCRIPTION

This module is used to create a named chunk of TAP text representing a complete stream, including the plan.

METHODS

new

    my $text = TAP::Stream::Text->new(
        name => $some_name,
        text => $tap,
    );
    say $text->name;         # return name
    say $text->to_string;    # return text

name

    my $name = $stream->name;

A read/write string accessor.

Returns the name of the stream. Default to Unnamed TAP stream. If you add this stream to another stream, consider naming this stream for a more useful TAP output. This is used by TAP::Stream to create the subtest summary line:

        1..2
        ok 1 - some test
        ok 2 - another test
    ok 1 - this is $tap->name

text

A read-only accessor for the text passed to the constructor.

AUTHOR

Curtis "Ovid" Poe <ovid@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Curtis "Ovid" Poe.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.