]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blob - lib/Test/Valgrind/Parser/XML.pm
This is 1.19
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Parser / XML.pm
1 package Test::Valgrind::Parser::XML;
2
3 use strict;
4 use warnings;
5
6 =head1 NAME
7
8 Test::Valgrind::Parser::XML - Parse valgrind output as an XML stream.
9
10 =head1 VERSION
11
12 Version 1.19
13
14 =cut
15
16 our $VERSION = '1.19';
17
18 =head1 DESCRIPTION
19
20 This is a base class for L<Test::Valgrind::Parser> objects that can parse C<valgrind>'s XML output.
21
22 =cut
23
24 use base qw<Test::Valgrind::Parser>;
25
26 =head1 METHODS
27
28 =head2 C<args>
29
30     my @args = $tvp->args($session, $fh);
31
32 Returns the arguments needed to tell C<valgrind> to print in XML to the filehandle C<$fh>.
33
34 =cut
35
36 sub args {
37  my $self = shift;
38  my ($session, $fh) = @_;
39
40  my $fd_opt = $session->version >= '3.5.0' ? '--xml-fd=' : '--log-fd=';
41
42  return (
43   $self->SUPER::args(@_),
44   '--xml=yes',
45   $fd_opt . fileno($fh),
46  );
47 }
48
49 =head1 SEE ALSO
50
51 L<Test::Valgrind>, L<Test::Valgrind::Parser>.
52
53 =head1 AUTHOR
54
55 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
56
57 You can contact me by mail or on C<irc.perl.org> (vincent).
58
59 =head1 BUGS
60
61 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>.
62 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
63
64 =head1 SUPPORT
65
66 You can find documentation for this module with the perldoc command.
67
68     perldoc Test::Valgrind::Parser::XML
69
70 =head1 COPYRIGHT & LICENSE
71
72 Copyright 2009,2010,2011,2013,2015,2016 Vincent Pit, all rights reserved.
73
74 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
75
76 =cut
77
78 1; # End of Test::Valgrind::Parser::XML