]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blob - lib/Test/Valgrind/Parser.pm
10eee71a55b00ca7cee1681afabbba1eab25e059
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Parser.pm
1 package Test::Valgrind::Parser;
2
3 use strict;
4 use warnings;
5
6 =head1 NAME
7
8 Test::Valgrind::Parser - Base class for Test::Valgrind parsers.
9
10 =head1 VERSION
11
12 Version 1.13
13
14 =cut
15
16 our $VERSION = '1.13';
17
18 =head1 DESCRIPTION
19
20 This class is the base for L<Test::Valgrind> parsers.
21
22 =cut
23
24 use base qw<Test::Valgrind::Component Test::Valgrind::Carp>;
25
26 =head1 METHODS
27
28 =head2 C<new>
29
30     my $tvp = Test::Valgrind::Parser->new;
31
32 The parser constructor, called without arguments.
33
34 Defaults to L<Test::Valgrind::Component/new>.
35
36 =head2 C<start>
37
38     $tvp->start($session);
39
40 Called when the C<$session> starts.
41
42 Defaults to set L<Test::Valgrind::Component/started>.
43
44 =head2 C<args>
45
46     my @args = $tvp->args($session, $fh);
47
48 Returns the list of parser-specific arguments that are to be passed to the C<valgrind> process spawned by the session C<$session> and whose output will be captured by the filehandle C<$fh>.
49
50 Defaults to the empty list.
51
52 =cut
53
54 sub args { }
55
56 =head2 C<parse>
57
58     $tvp->parse($session, $fh);
59
60 Parse the output of the C<valgrind> process attached to the session C<$session> received through the filehandle C<$fh>.
61
62 This method must be implemented when subclassing.
63
64 =cut
65
66 sub parse;
67
68 =head2 C<finish>
69
70     $tvp->finish($session);
71
72 Called when the C<$session> finishes.
73
74 Defaults to clear L<Test::Valgrind::Component/started>.
75
76 =head1 SEE ALSO
77
78 L<Test::Valgrind>, L<Test::Valgrind::Component>, L<Test::Valgrind::Session>.
79
80 =head1 AUTHOR
81
82 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
83
84 You can contact me by mail or on C<irc.perl.org> (vincent).
85
86 =head1 BUGS
87
88 Please report any bugs or feature requests to C<bug-test-valgrind at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind>.
89 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
90
91 =head1 SUPPORT
92
93 You can find documentation for this module with the perldoc command.
94
95     perldoc Test::Valgrind::Parser
96
97 =head1 COPYRIGHT & LICENSE
98
99 Copyright 2009,2010,2011 Vincent Pit, all rights reserved.
100
101 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
102
103 =cut
104
105 1; # End of Test::Valgrind::Parser