r45627 - in /trunk/libtest-valgrind-perl: ./ debian/ lib/Test/ lib/Test/Valgrind/ lib/Test/Valgrind/Action/ lib/Test/Valgrind/Command/ lib/Test/Valgrind/Parser/ lib/Test/Valgrind/Parser/Suppressions/ lib/Test/Valgrind/Parser/XML/ lib/Test/Valgrind/Tool/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Mon Oct 12 14:49:40 UTC 2009


Author: jawnsy-guest
Date: Mon Oct 12 14:49:35 2009
New Revision: 45627

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45627
Log:
Documentation changes only, purely convenience fixes to Makefile.PL.
No function changes. No need for upload.
IGNORE-VERSION: 1.11-1
* New upstream release

Modified:
    trunk/libtest-valgrind-perl/Changes
    trunk/libtest-valgrind-perl/META.yml
    trunk/libtest-valgrind-perl/Makefile.PL
    trunk/libtest-valgrind-perl/README
    trunk/libtest-valgrind-perl/debian/changelog
    trunk/libtest-valgrind-perl/lib/Test/Valgrind.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Captor.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Suppressions.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Test.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Carp.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Aggregate.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Perl.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/PerlScript.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Component.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Suppressions/Text.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Text.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML/Twig.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Report.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Session.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Suppressions.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool.pm
    trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool/memcheck.pm
    trunk/libtest-valgrind-perl/t/92-pod-coverage.t
    trunk/libtest-valgrind-perl/t/99-kwalitee.t

Modified: trunk/libtest-valgrind-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/Changes?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/Changes (original)
+++ trunk/libtest-valgrind-perl/Changes Mon Oct 12 14:49:35 2009
@@ -1,4 +1,9 @@
 Revision history for Test-Valgrind
+
+1.11    2009-10-08 20:55 UTC
+        + Doc : Completion and improvements.
+        + Fix : Work around Kwalitee test misfailures.
+        + Upd : Freshen Makefile.PL.
 
 1.10    2009-09-22 18:45 UTC
         + Chg : valgrind is no longer required to be installed before installing

Modified: trunk/libtest-valgrind-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/META.yml?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/META.yml (original)
+++ trunk/libtest-valgrind-perl/META.yml Mon Oct 12 14:49:35 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Test-Valgrind
-version:            1.10
+version:            1.11
 abstract:           Generate suppressions, analyse and test any command with valgrind.
 author:
     - Vincent Pit <perl at profvince.com>
@@ -58,10 +58,11 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.54
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4
+dynamic_config:     1
 recommends:
     DynaLoader:  0
     XSLoader:    0

Modified: trunk/libtest-valgrind-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/Makefile.PL?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/Makefile.PL (original)
+++ trunk/libtest-valgrind-perl/Makefile.PL Mon Oct 12 14:49:35 2009
@@ -41,6 +41,13 @@
  print "none\n";
 }
 
+my $dist = 'Test-Valgrind';
+
+(my $name = $dist) =~ s{-}{::}g;
+
+(my $file = $dist) =~ s{-}{/}g;
+$file = "lib/$file.pm";
+
 my %PREREQ_PM = (
  'Carp'                  => 0,
  'Digest::MD5'           => 0,
@@ -62,8 +69,6 @@
  'version'               => 0,
 );
 
-my $dist = 'Test-Valgrind';
-
 my %META = (
  configure_requires => {
   'File::Spec'          => 0,
@@ -78,6 +83,7 @@
   'DynaLoader' => 0,
   'XSLoader'   => 0,
  },
+ dynamic_config => 1,
  resources => {
   bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
   homepage   => "http://search.cpan.org/dist/$dist/",
@@ -87,21 +93,21 @@
 );
 
 WriteMakefile(
-    NAME             => 'Test::Valgrind',
-    AUTHOR           => 'Vincent Pit <perl at profvince.com>',
-    LICENSE          => 'perl',
-    VERSION_FROM     => 'lib/Test/Valgrind.pm',
-    ABSTRACT_FROM    => 'lib/Test/Valgrind.pm',
-    OPTIMIZE         => '-g',
-    C                => \@C,
-    PREREQ_PM        => \%PREREQ_PM,
-    MIN_PERL_VERSION => 5.006,
-    META_MERGE       => \%META,
-    dist             => {
-        PREOP    => 'pod2text lib/Test/Valgrind.pm > $(DISTVNAME)/README',
-        COMPRESS => 'gzip -9f', SUFFIX => 'gz',
-    },
-    clean            => {
-        FILES => "$dist-* Makefile.bak *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"
-    },
+ NAME             => $name,
+ AUTHOR           => 'Vincent Pit <perl at profvince.com>',
+ LICENSE          => 'perl',
+ VERSION_FROM     => $file,
+ ABSTRACT_FROM    => $file,
+ OPTIMIZE         => '-g',
+ C                => \@C,
+ PREREQ_PM        => \%PREREQ_PM,
+ MIN_PERL_VERSION => 5.006,
+ META_MERGE       => \%META,
+ dist             => {
+  PREOP    => "pod2text $file > \$(DISTVNAME)/README",
+  COMPRESS => 'gzip -9f', SUFFIX => 'gz',
+ },
+ clean            => {
+  FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt"
+ },
 );

Modified: trunk/libtest-valgrind-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/README?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/README (original)
+++ trunk/libtest-valgrind-perl/README Mon Oct 12 14:49:35 2009
@@ -3,7 +3,7 @@
     with valgrind.
 
 VERSION
-    Version 1.10
+    Version 1.11
 
 SYNOPSIS
         # From the command-line
@@ -129,14 +129,14 @@
     the "diag" option, in which case it will be reprinted as diagnostics.
 
 DEPENDENCIES
-    Valgrind 3.1.0 (<http://valgrind.org>).
-
     XML::Twig, version, File::HomeDir, Env::Sanctify, Perl::Destruct::Level.
 
 SEE ALSO
     All the "Test::Valgrind::*" API, including Test::Valgrind::Command,
     Test::Valgrind::Tool, Test::Valgrind::Action and
     Test::Valgrind::Session.
+
+    The valgrind(1) man page.
 
     Test::LeakTrace.
 

Modified: trunk/libtest-valgrind-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/debian/changelog?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/debian/changelog (original)
+++ trunk/libtest-valgrind-perl/debian/changelog Mon Oct 12 14:49:35 2009
@@ -1,3 +1,13 @@
+libtest-valgrind-perl (1.11-1) UNRELEASED; urgency=low
+
+  Documentation changes only, purely convenience fixes to Makefile.PL.
+  No function changes. No need for upload.
+  IGNORE-VERSION: 1.11-1
+
+  * New upstream release
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Mon, 12 Oct 2009 07:05:54 -0400
+
 libtest-valgrind-perl (1.10-1) unstable; urgency=low
 
   [ Nathan Handler ]

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
-
-=cut
-
-our $VERSION = '1.10';
+Version 1.11
+
+=cut
+
+our $VERSION = '1.11';
 
 =head1 SYNOPSIS
 
@@ -308,13 +308,13 @@
 
 =head1 DEPENDENCIES
 
-Valgrind 3.1.0 (L<http://valgrind.org>).
-
 L<XML::Twig>, L<version>, L<File::HomeDir>, L<Env::Sanctify>, L<Perl::Destruct::Level>.
 
 =head1 SEE ALSO
 
 All the C<Test::Valgrind::*> API, including L<Test::Valgrind::Command>, L<Test::Valgrind::Tool>, L<Test::Valgrind::Action> and L<Test::Valgrind::Session>.
+
+The C<valgrind(1)> man page.
 
 L<Test::LeakTrace>.
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Captor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Captor.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Captor.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Captor.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Suppressions.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Suppressions.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Suppressions.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Suppressions.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Test.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Test.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Test.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Action/Test.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
-
-=cut
-
-our $VERSION = '1.10';
+Version 1.11
+
+=cut
+
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Carp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Carp.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Carp.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Carp.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,19 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
+
+=head1 DESCRIPTION
+
+This class only provides a C<_croak> method that lazily requires L<Carp> and then croaks with the supplied message.
+
+The class should not be used outside from L<Test::Valgrind> and may be removed without notice.
+
+=cut
 
 sub _croak {
  shift;

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
@@ -100,7 +100,7 @@
 
 =head2 C<filter $session, $report>
 
-The <$session> calls this method after receiving a report from the tool and before forwarding it to the action.
+The C<$session> calls this method after receiving a report from the tool and before forwarding it to the action.
 You can either return a mangled C<$report> (which does not need to be a clone of the original) or C<undef> if you want the action to ignore it completely.
 
 Defaults to the identity function.

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Aggregate.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Aggregate.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Aggregate.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Aggregate.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Perl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Perl.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Perl.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/Perl.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
-
-=cut
-
-our $VERSION = '1.10';
+Version 1.11
+
+=cut
+
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/PerlScript.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/PerlScript.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/PerlScript.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Command/PerlScript.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Component.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Component.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Component.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Component.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,17 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
+
+=head1 DESCRIPTION
+
+This class is the base for all others that act as components that can be started and stopped.
+
+=cut
 
 use Scalar::Util ();
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
@@ -27,9 +27,19 @@
 
 =head2 C<new>
 
+The parser constructor, called without arguments.
+
+Defaults to L<Test::Valgrind::Component/new>.
+
+=head2 C<start $session>
+
+Called when the C<$session> starts.
+
+Defaults to set L<Test::Valgrind::Component/started>.
+
 =head2 C<args $session, $fh>
 
-Returns the list of parser-specific arguments that are to be passed to C<valgrind>.
+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>.
 
 Defaults to the empty list.
 
@@ -39,17 +49,13 @@
 
 =head2 C<parse $session, $fh>
 
+Parse the output of the C<valgrind> process attached to the session C<$session> received through the filehandle C<$fh>.
+
 This method must be implemented when subclassing.
 
 =cut
 
 sub parse;
-
-=head2 C<start $session>
-
-Called when the C<$session> starts.
-
-Defaults to set L<Test::Valgrind::Component/started>.
 
 =head2 C<finish $session>
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Suppressions/Text.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Suppressions/Text.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Suppressions/Text.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Suppressions/Text.pm Mon Oct 12 14:49:35 2009
@@ -9,15 +9,15 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
-This is a L<Test::Valgrind::Parser> object that can extract suppressions from C<valgrind>'s text output.
+This is a L<Test::Valgrind::Parser::Text> object that can extract suppressions from C<valgrind>'s text output.
 
 =cut
 
@@ -33,12 +33,6 @@
 =cut
 
 sub report_class { 'Test::Valgrind::Report::Suppressions' }
-
-=head2 C<parse $session, $fh>
-
-Parses the filehandle C<$fh> fed with the output of F<valgrind --gen-suppressions=all> and sends a report to the session C<$session> for each suppression.
-
-=cut
 
 sub parse {
  my ($self, $sess, $fh) = @_;

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Text.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Text.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Text.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/Text.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
@@ -27,7 +27,7 @@
 
 =head2 C<args $session, $fh>
 
-Returns the arguments needed to tell C<valgrind> to print to the filehandle C<$fh>.
+Returns the arguments needed to tell C<valgrind> to print in text to the filehandle C<$fh>.
 
 =cut
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
@@ -39,6 +39,7 @@
 
  return (
   $self->SUPER::args(@_),
+  '--xml=yes',
   $fd_opt . fileno($fh),
  );
 }

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML/Twig.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML/Twig.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML/Twig.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Parser/XML/Twig.pm Mon Oct 12 14:49:35 2009
@@ -3,7 +3,24 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.10';
+=head1 NAME
+
+Test::Valgrind::Parser::XML::Twig - Parse valgrind XML output with XML::Twig.
+
+=head1 VERSION
+
+Version 1.11
+
+=cut
+
+our $VERSION = '1.11';
+
+=head1 DESCRIPTION
+
+This subclass of L<XML::Twig> and L<Test::Valgrind::Parser::XML> encapsulates an L<XML::Twig> parser inside the L<Test::Valgrind::Parser> framework.
+It is able to parse the XML output from C<valgrind> up to protocol version 4 and to generate the appropriate reports accordingly.
+
+=cut
 
 use Scalar::Util ();
 
@@ -15,6 +32,10 @@
  '/valgrindoutput/protocolversion' => \&handle_version,
  '/valgrindoutput/error'           => \&handle_error,
 );
+
+=head1 METHODS
+
+=cut
 
 sub new {
  my $class = shift;
@@ -33,6 +54,13 @@
 
 sub stash { shift->{Stash} }
 
+=head2 C<protocol_version>
+
+The version of the protocol that the current stream is conforming to.
+It is reset before and after the parsing phase, so it's effectively only available from inside L</parse>.
+
+=cut
+
 eval "sub $_ { \@_ <= 1 ? \$_[0]->{$_} : (\$_[0]->{$_} = \$_[1]) }"
                                               for qw/_session protocol_version/;
 
@@ -51,8 +79,12 @@
 sub parse {
  my ($self, $sess, $fh) = @_;
 
+ $self->protocol_version(undef);
+
  $self->XML::Twig::parse($fh);
  $self->purge;
+
+ $self->protocol_version(undef);
 
  return;
 }
@@ -123,11 +155,42 @@
  $twig->purge;
 }
 
+=head1 SEE ALSO
+
+L<Test::Valgrind>, L<Test::Valgrind::Parser>, L<Test::Valgrind::Parser::XML>.
+
+L<XML::Twig>.
+
+=head1 AUTHOR
+
+Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
+
+You can contact me by mail or on C<irc.perl.org> (vincent).
+
+=head1 BUGS
+
+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>.
+I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+    perldoc Test::Valgrind::Parser::XML::Twig
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2009 Vincent Pit, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
 # End of Test::Valgrind::Parser::XML::Twig
 
 package Test::Valgrind::Parser::XML::Twig::Elt;
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 BEGIN { require XML::Twig; }
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Report.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Report.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Report.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Report.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,21 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
+
+=head1 DESCRIPTION
+
+This class provides a generic API for messages (the so-called I<reports>) generated by the parser, filtered by the tool and the command, and handled by the action.
+The tool has authority for deciding in which subclass of this one reports should be blessed.
+
+Reports are classified by I<kinds>.
+The C<Diag> kind is reserved for diagnostics.
+
+=cut
 
 use base qw/Test::Valgrind::Carp/;
 
@@ -65,7 +75,7 @@
 
 =head2 C<< new_diag $data >>
 
-Constructs an object with kind C<'Diag'>, an auto-incremented identifier and the given C<$data>.
+Constructs a report with kind C<'Diag'>, an auto-incremented identifier and the given C<$data>.
 
 =cut
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Session.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Session.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Session.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Session.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
-
-=cut
-
-our $VERSION = '1.10';
+Version 1.11
+
+=cut
+
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
@@ -304,6 +304,14 @@
 
 sub do_suppressions { $_[0]->action->do_suppressions }
 
+=head2 C<parser_class>
+
+Calls C<< ->tool->parser_class >> with the current session object as the unique argument.
+
+=cut
+
+sub parser_class { $_[0]->tool->parser_class($_[0]) }
+
 =head2 C<report_class>
 
 Calls C<< ->action->report_class >> with the current session object as the unique argument.
@@ -385,7 +393,7 @@
  delete @{$self}{qw/last_status exit_code/};
 
  $self->tool->start($self);
- $self->parser($self->tool->parser_class($self)->new)->start($self);
+ $self->parser($self->parser_class->new)->start($self);
  $self->action->start($self);
 
  return;

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Suppressions.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Suppressions.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Suppressions.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Suppressions.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool.pm Mon Oct 12 14:49:35 2009
@@ -9,11 +9,11 @@
 
 =head1 VERSION
 
-Version 1.10
+Version 1.11
 
 =cut
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
@@ -120,7 +120,7 @@
 
 =head2 C<filter $session, $report>
 
-The <$session> calls this method after receiving a report from the parser and before letting the command filter it.
+The C<$session> calls this method after receiving a report from the parser and before letting the command filter it.
 You can either return a mangled C<$report> (which does not need to be a clone of the original) or C<undef> if you want the action to ignore it completely.
 
 Defaults to the identity function.

Modified: trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool/memcheck.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool/memcheck.pm?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool/memcheck.pm (original)
+++ trunk/libtest-valgrind-perl/lib/Test/Valgrind/Tool/memcheck.pm Mon Oct 12 14:49:35 2009
@@ -9,15 +9,15 @@
 
 =head1 VERSION
 
-Version 1.10
-
-=cut
-
-our $VERSION = '1.10';
+Version 1.11
+
+=cut
+
+our $VERSION = '1.11';
 
 =head1 DESCRIPTION
 
-This tool parses the XML output of a C<memcheck> run with L<XML::Twig>.
+This class contains the information required by the session for running the C<memcheck> tool.
 
 =cut
 
@@ -75,7 +75,7 @@
 
 =head2 C<parser_class $session>
 
-This tool uses a C<Test::Valgrind::Parser::XML::Twig> parser in analysis mode, and a C<Test::Valgrind::Parser::Suppressions::Text> parser in suppressions mode.
+This tool uses a L<Test::Valgrind::Parser::XML::Twig> parser in analysis mode, and a L<Test::Valgrind::Parser::Suppressions::Text> parser in suppressions mode.
 
 =cut
 
@@ -94,7 +94,7 @@
 
 =head2 C<report_class $session>
 
-This tool emits C<Test::Valgrind::Tool::memcheck::Report> object reports in analysis mode.
+This tool emits C<Test::Valgrind::Tool::memcheck::Report> object reports in analysis mode, and C<Test::Valgrind::Report::Suppressions> object reports in suppressions mode.
 
 =cut
 
@@ -118,10 +118,8 @@
   '--error-limit=yes',
  );
 
- unless ($sess->do_suppressions) {
-  push @args, '--track-origins=yes' if $sess->version ge '3.4.0';
-  push @args, '--xml=yes';
- }
+ push @args, '--track-origins=yes' if  $sess->version ge '3.4.0'
+                                   and not $sess->do_suppressions;
 
  push @args, $self->SUPER::args(@_);
 
@@ -131,8 +129,6 @@
 =head1 SEE ALSO
 
 L<Test::Valgrind>, L<Test::Valgrind::Tool>.
-
-L<XML::Twig>.
 
 =head1 AUTHOR
 
@@ -165,7 +161,7 @@
 
 use base qw/Test::Valgrind::Report/;
 
-our $VERSION = '1.10';
+our $VERSION = '1.11';
 
 my @kinds = qw/
  InvalidFree

Modified: trunk/libtest-valgrind-perl/t/92-pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/t/92-pod-coverage.t?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/t/92-pod-coverage.t (original)
+++ trunk/libtest-valgrind-perl/t/92-pod-coverage.t Mon Oct 12 14:49:35 2009
@@ -18,7 +18,7 @@
 
 my $trustparents = { coverage_class => 'Pod::Coverage::CountParents' };
 
-plan tests => 16;
+plan tests => 21;
 
 pod_coverage_ok('Test::Valgrind');
 
@@ -34,7 +34,16 @@
 pod_coverage_ok('Test::Valgrind::Command::Perl', $trustparents);
 pod_coverage_ok('Test::Valgrind::Command::PerlScript', $trustparents);
 
-pod_coverage_ok('Test::Valgrind::Parser::Suppressions::Text');
+pod_coverage_ok('Test::Valgrind::Component');
+
+pod_coverage_ok('Test::Valgrind::Parser');
+pod_coverage_ok('Test::Valgrind::Parser::Suppressions::Text', $trustparents);
+pod_coverage_ok('Test::Valgrind::Parser::Text', $trustparents);
+pod_coverage_ok('Test::Valgrind::Parser::XML', $trustparents);
+pod_coverage_ok('Test::Valgrind::Parser::XML::Twig', {
+ %$trustparents,
+ also_private => [ qr/^handle_/, qw/stash/ ],
+});
 
 pod_coverage_ok('Test::Valgrind::Report');
 pod_coverage_ok('Test::Valgrind::Session');

Modified: trunk/libtest-valgrind-perl/t/99-kwalitee.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-valgrind-perl/t/99-kwalitee.t?rev=45627&op=diff
==============================================================================
--- trunk/libtest-valgrind-perl/t/99-kwalitee.t (original)
+++ trunk/libtest-valgrind-perl/t/99-kwalitee.t Mon Oct 12 14:49:35 2009
@@ -5,5 +5,17 @@
 
 use Test::More;
 
-eval { require Test::Kwalitee; Test::Kwalitee->import() };
-plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@;
+eval { require Test::Kwalitee; };
+plan(skip_all => 'Test::Kwalitee not installed') if $@;
+
+SKIP: {
+ eval { Test::Kwalitee->import(); };
+ if (my $err = $@) {
+  1 while chomp $err;
+  require Test::Builder;
+  my $Test = Test::Builder->new;
+  my $plan = $Test->has_plan;
+  $Test->skip_all($err) if not defined $plan or $plan eq 'no_plan';
+  skip $err => $plan - $Test->current_test;
+ }
+}




More information about the Pkg-perl-cvs-commits mailing list