NAME

TAPx::Parser::Source::Perl - Stream Perl output

VERSION

Version 0.20

DESCRIPTION

Takes a filename and hopefully returns a stream from it. The filename should be the name of a Perl program.

SYNOPSIS

use TAPx::Parser::Source::Perl;
my $source = TAPx::Parser::Source::Perl->new;
my $stream = $source->filename($filename)->get_stream;

##############################################################################

METHODS

Class methods

new

my $source = TAPx::Parser::Source::Perl->new;

Returns a new TAPx::Parser::Source::Perl object.

Instace methods

filename

my $filename = $source->filename;
$source->filename($filename);

Getter/setter for the source filename. Will croak if the $filename does not appear to be a file.

get_stream

my $stream = $source->get_stream;

Returns a stream of the output generated by executing filename.

error

unless ( my $stream = $source->get_stream ) {
    die $source->error;
}

If a stream cannot be created, this method will return the error.