1TAP::Parser::SourceHandUlseerr::CFoinlter(i3b)uted PerlTDAoPc:u:mPeanrtsaetri:o:nSourceHandler::File(3)
2
3
4
6 TAP::Parser::SourceHandler::File - Stream TAP from a text file.
7
9 Version 3.42
10
12 use TAP::Parser::Source;
13 use TAP::Parser::SourceHandler::File;
14
15 my $source = TAP::Parser::Source->new->raw( \'file.tap' );
16 $source->assemble_meta;
17
18 my $class = 'TAP::Parser::SourceHandler::File';
19 my $vote = $class->can_handle( $source );
20 my $iter = $class->make_iterator( $source );
21
23 This is a raw TAP stored in a file TAP::Parser::SourceHandler - it has
24 2 jobs:
25
26 1. Figure out if the raw source it's given is a file containing raw TAP
27 output. See TAP::Parser::IteratorFactory for more details.
28
29 2. Takes raw TAP from the text file given, and converts into an
30 iterator.
31
32 Unless you're writing a plugin or subclassing TAP::Parser, you probably
33 won't need to use this module directly.
34
36 Class Methods
37 "can_handle"
38
39 my $vote = $class->can_handle( $source );
40
41 Only votes if $source looks like a regular file. Casts the following
42 votes:
43
44 0.9 if it's a .tap file
45 0.9 if it has an extension matching any given in user config.
46
47 "make_iterator"
48
49 my $iterator = $class->make_iterator( $source );
50
51 Returns a new TAP::Parser::Iterator::Stream for the source. "croak"s
52 on error.
53
54 "iterator_class"
55
56 The class of iterator to use, override if you're sub-classing.
57 Defaults to TAP::Parser::Iterator::Stream.
58
60 {
61 extensions => [ @case_insensitive_exts_to_match ]
62 }
63
65 Please see "SUBCLASSING" in TAP::Parser for a subclassing overview.
66
68 TAP::Object, TAP::Parser, TAP::Parser::SourceHandler,
69 TAP::Parser::SourceHandler::Executable,
70 TAP::Parser::SourceHandler::Perl, TAP::Parser::SourceHandler::Handle,
71 TAP::Parser::SourceHandler::RawTAP
72
73
74
75perl v5.26.3 2018-03-19TAP::Parser::SourceHandler::File(3)