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