This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Test-Harness to CPAN version 3.33
[perl5.git] / cpan / Test-Harness / lib / TAP / Parser / Result / Pragma.pm
CommitLineData
2a7f4b9b
SP
1package TAP::Parser::Result::Pragma;
2
3use strict;
befb5359 4use warnings;
2a7f4b9b 5
406e3fef 6use base 'TAP::Parser::Result';
2a7f4b9b
SP
7
8=head1 NAME
9
10TAP::Parser::Result::Pragma - TAP pragma token.
11
12=head1 VERSION
13
1bd25aa9 14Version 3.33
2a7f4b9b
SP
15
16=cut
17
1bd25aa9 18our $VERSION = '3.33';
2a7f4b9b
SP
19
20=head1 DESCRIPTION
21
22This is a subclass of L<TAP::Parser::Result>. A token of this class will be
23returned if a pragma is encountered.
24
25 TAP version 13
26 pragma +strict, -foo
27
28Pragmas are only supported from TAP version 13 onwards.
29
30=head1 OVERRIDDEN METHODS
31
32Mainly listed here to shut up the pitiful screams of the pod coverage tests.
33They keep me awake at night.
34
35=over 4
36
37=item * C<as_string>
38
39=item * C<raw>
40
41=back
42
43=cut
44
45##############################################################################
46
47=head2 Instance Methods
48
49=head3 C<pragmas>
50
51if ( $result->is_pragma ) {
52 @pragmas = $result->pragmas;
53}
54
55=cut
56
57sub pragmas {
58 my @pragmas = @{ shift->{pragmas} };
59 return wantarray ? @pragmas : \@pragmas;
60}
61
621;