]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blob - lib/Test/Valgrind/Parser/XML.pm
This is 1.10
[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.10
13
14 =cut
15
16 our $VERSION = '1.10';
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 $session, $fh>
29
30 Returns the arguments needed to tell C<valgrind> to print in XML to the filehandle C<$fh>.
31
32 =cut
33
34 sub args {
35  my $self = shift;
36  my ($session, $fh) = @_;
37
38  my $fd_opt = $session->version ge '3.5.0' ? '--xml-fd=' : '--log-fd=';
39
40  return (
41   $self->SUPER::args(@_),
42   $fd_opt . fileno($fh),
43  );
44 }
45
46 =head1 SEE ALSO
47
48 L<Test::Valgrind>, L<Test::Valgrind::Parser>.
49
50 =head1 AUTHOR
51
52 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
53
54 You can contact me by mail or on C<irc.perl.org> (vincent).
55
56 =head1 BUGS
57
58 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>.
59 I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
60
61 =head1 SUPPORT
62
63 You can find documentation for this module with the perldoc command.
64
65     perldoc Test::Valgrind::Parser::XML
66
67 =head1 COPYRIGHT & LICENSE
68
69 Copyright 2009 Vincent Pit, all rights reserved.
70
71 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
72
73 =cut
74
75 1; # End of Test::Valgrind::Parser::XML