X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FParser%2FSuppressions%2FText.pm;h=7a91d5fa80411d691845beef0abdb2a04eef7fa2;hb=93bdd32c84466f212aded61d70219e82cb538620;hp=6142e4278d01b484eb7bcb0a24ed0fd88d3b3a22;hpb=31a371128b71987723d8ac1587297141026a83bf;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Parser/Suppressions/Text.pm b/lib/Test/Valgrind/Parser/Suppressions/Text.pm index 6142e42..7a91d5f 100644 --- a/lib/Test/Valgrind/Parser/Suppressions/Text.pm +++ b/lib/Test/Valgrind/Parser/Suppressions/Text.pm @@ -1,59 +1,40 @@ -package Test::Valgrind::Tool::SuppressionsParser; +package Test::Valgrind::Parser::Suppressions::Text; use strict; use warnings; =head1 NAME -Test::Valgrind::Tool::SuppressionsParser - Mock Test::Valgrind::Tool for parsing valgrind suppressions. +Test::Valgrind::Parser::Suppressions::Text - Parse valgrind suppressions output as text blocks. =head1 VERSION -Version 1.02 +Version 1.10 =cut -our $VERSION = '1.02'; +our $VERSION = '1.10'; =head1 DESCRIPTION -This class provides a default C method, so that real tools for which suppressions are meaningful can exploit it by inheriting. - -It's not meant to be used directly as a tool. +This is a L object that can extract suppressions from C's text output. =cut -use base qw/Test::Valgrind::Carp/; +use base qw/Test::Valgrind::Parser::Text Test::Valgrind::Carp/; =head1 METHODS -=head2 C - -Just a croaking stub to remind you not to use this class as a real tool. - -If your tool both inherit from this class and from C, and that you want to dispatch the call to your C to its ancestors', be careful with C which may end up calling this dieing version of C. -The solution is to either put C first in the C<@ISA> list or to explicitely call C instead of C. - -=cut - -sub new { shift->_croak('This mock tool isn\'t meant to be used directly') } - -=head2 C +=head2 C Generated reports are C objects. Their C member contains the raw text of the suppression. =cut -sub report_class_suppressions { 'Test::Valgrind::Report::Suppressions' } - -=head2 C - -Parses the filehandle C<$fh> fed with the output of F and sends a report to the session C<$session> for each suppression. - -=cut +sub report_class { 'Test::Valgrind::Report::Suppressions' } -sub parse_suppressions { +sub parse { my ($self, $sess, $fh) = @_; my ($s, $in) = ('', 0); @@ -124,7 +105,7 @@ sub parse_suppressions { =head1 SEE ALSO -L, L. +L, L. =head1 AUTHOR @@ -141,7 +122,7 @@ I will be notified, and then you'll automatically be notified of progress on you You can find documentation for this module with the perldoc command. - perldoc Test::Valgrind::Tool::SuppressionsParser + perldoc Test::Valgrind::Parser::Suppressions::Text =head1 COPYRIGHT & LICENSE @@ -151,7 +132,7 @@ This program is free software; you can redistribute it and/or modify it under th =cut -# End of Test::Valgrind::Tool::SuppressionsParser +# End of Test::Valgrind::Parser::Suppressions::Text package Test::Valgrind::Report::Suppressions;