1package TAP::Parser::Result::Comment; 2 3use strict; 4 5use vars qw($VERSION @ISA); 6use TAP::Parser::Result; 7@ISA = 'TAP::Parser::Result'; 8 9=head1 NAME 10 11TAP::Parser::Result::Comment - Comment result token. 12 13=head1 VERSION 14 15Version 3.17 16 17=cut 18 19$VERSION = '3.17'; 20 21=head1 DESCRIPTION 22 23This is a subclass of L<TAP::Parser::Result>. A token of this class will be 24returned if a comment line is encountered. 25 26 1..1 27 ok 1 - woo hooo! 28 # this is a comment 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 39Note that this method merely returns the comment preceded by a '# '. 40 41=back 42 43=cut 44 45############################################################################## 46 47=head2 Instance Methods 48 49=head3 C<comment> 50 51 if ( $result->is_comment ) { 52 my $comment = $result->comment; 53 print "I have something to say: $comment"; 54 } 55 56=cut 57 58sub comment { shift->{comment} } 59sub as_string { shift->{raw} } 60 611; 62