r61196 - in /branches/upstream/libtest-leaktrace-perl/current: ./ inc/Module/ inc/Module/Install/ lib/Test/ lib/Test/LeakTrace/ t/
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Thu Aug 5 09:47:56 UTC 2010
Author: ansgar-guest
Date: Thu Aug 5 09:47:39 2010
New Revision: 61196
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=61196
Log:
[svn-upgrade] new version libtest-leaktrace-perl (0.13)
Modified:
branches/upstream/libtest-leaktrace-perl/current/Changes
branches/upstream/libtest-leaktrace-perl/current/LeakTrace.xs
branches/upstream/libtest-leaktrace-perl/current/META.yml
branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install.pm
branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Base.pm
branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/MakeMaker.pm
branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace.pm
branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace/JA.pod
branches/upstream/libtest-leaktrace-perl/current/t/03_count.t
branches/upstream/libtest-leaktrace-perl/current/t/10_bad_use.t
Modified: branches/upstream/libtest-leaktrace-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/Changes?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/Changes (original)
+++ branches/upstream/libtest-leaktrace-perl/current/Changes Thu Aug 5 09:47:39 2010
@@ -1,4 +1,11 @@
Revision history for Perl extension Test::LeakTrace
+
+0.13 Sun Aug 1 15:17:23 2010
+ - Fix tests for older perls
+
+0.12 Sun Aug 1 15:11:34 2010
+ - Use ">= 0", instead of "== 0" for no_leaks_ok()
+ - Add count_sv() to count all the SVs in a perl interpreter
0.11 Mon Jun 14 16:16:49 2010
- Resolve RT #58133: "False-positive related to XS code"
Modified: branches/upstream/libtest-leaktrace-perl/current/LeakTrace.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/LeakTrace.xs?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/LeakTrace.xs (original)
+++ branches/upstream/libtest-leaktrace-perl/current/LeakTrace.xs Thu Aug 5 09:47:39 2010
@@ -499,7 +499,7 @@
RETVAL
UV
-_count_sv_in_arena()
+count_sv()
CODE:
RETVAL = count_sv_in_arena(aTHX);
OUTPUT:
Modified: branches/upstream/libtest-leaktrace-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/META.yml?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/META.yml (original)
+++ branches/upstream/libtest-leaktrace-perl/current/META.yml Thu Aug 5 09:47:39 2010
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.98'
+generated_by: 'Module::Install version 1.00'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,4 +26,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: git://github.com/gfx/Perl-Test-LeakTrace.git
-version: 0.11
+version: 0.13
Modified: branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install.pm?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install.pm Thu Aug 5 09:47:39 2010
@@ -22,7 +22,6 @@
use Cwd ();
use File::Find ();
use File::Path ();
-use FindBin;
use vars qw{$VERSION $MAIN};
BEGIN {
@@ -32,7 +31,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.98';
+ $VERSION = '1.00';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -231,7 +230,12 @@
sub new {
my ($class, %args) = @_;
- FindBin->again;
+ delete $INC{'FindBin.pm'};
+ {
+ # to suppress the redefine warning
+ local $SIG{__WARN__} = sub {};
+ require FindBin;
+ }
# ignore the prefix on extension modules built from top level.
my $base_path = Cwd::abs_path($FindBin::Bin);
Modified: branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Base.pm?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Base.pm Thu Aug 5 09:47:39 2010
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '0.98';
+ $VERSION = '1.00';
}
# Suspend handler for "redefined" warnings
Modified: branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/MakeMaker.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/MakeMaker.pm?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/MakeMaker.pm (original)
+++ branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/MakeMaker.pm Thu Aug 5 09:47:39 2010
@@ -7,7 +7,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.98';
+ $VERSION = '1.00';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Makefile.pm?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Makefile.pm Thu Aug 5 09:47:39 2010
@@ -8,7 +8,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.98';
+ $VERSION = '1.00';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Metadata.pm?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libtest-leaktrace-perl/current/inc/Module/Install/Metadata.pm Thu Aug 5 09:47:39 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.98';
+ $VERSION = '1.00';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace.pm?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace.pm (original)
+++ branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace.pm Thu Aug 5 09:47:39 2010
@@ -4,7 +4,7 @@
use strict;
use warnings;
-our $VERSION = '0.11';
+our $VERSION = '0.13';
use XSLoader;
XSLoader::load(__PACKAGE__, $VERSION);
@@ -16,12 +16,13 @@
our @EXPORT = qw(
leaktrace leaked_refs leaked_info leaked_count
no_leaks_ok leaks_cmp_ok
+ count_sv
);
our %EXPORT_TAGS = (
all => \@EXPORT,
test => [qw(no_leaks_ok leaks_cmp_ok)],
- util => [qw(leaktrace leaked_refs leaked_info leaked_count)],
+ util => [qw(leaktrace leaked_refs leaked_info leaked_count count_sv)],
);
@@ -30,6 +31,13 @@
if(!defined($mode) && !defined wantarray){
warnings::warnif void => "Useless use of $name() in void context";
+ }
+
+ if($name eq 'leaked_count') {
+ my $start;
+ $start = count_sv();
+ $block->();
+ return count_sv() - $start;
}
local $SIG{__DIE__} = 'DEFAULT';
@@ -81,11 +89,7 @@
# calls to prepare cache in $block
$block->();
- #my $got = _do_leaktrace($block, 'leaked_count', 0);
- my($start, $got);
- $start = _count_sv_in_arena();
- $block->();
- $got = _count_sv_in_arena() - $start;
+ my $got = _do_leaktrace($block, 'leaked_count', 0);
my $desc = sprintf 'leaks %s %-2s %s', $got, $cmp_op, $expected;
if(defined $description){
@@ -110,7 +114,7 @@
sub no_leaks_ok(&;$){
# ($block, $description)
- splice @_, 1, 0, ('==', 0); # ($block, '==', 0, $description);
+ splice @_, 1, 0, ('<=', 0); # ($block, '<=', 0, $description);
goto &leaks_cmp_ok;
}
@@ -126,7 +130,7 @@
=head1 VERSION
-This document describes Test::LeakTrace version 0.11.
+This document describes Test::LeakTrace version 0.13.
=head1 SYNOPSIS
@@ -244,6 +248,10 @@
Note that I<BLOCK> is called more than once. This is because
I<BLOCK> might prepare caches which are not memory leaks.
+=head3 C<< count_sv() >>
+
+Counts all the SVs in the arena.
+
=head2 Script interface
Like C<Devel::LeakTrace> C<Test::LeakTrace::Script> is provided for whole scripts.
@@ -323,7 +331,7 @@
=head1 LICENSE AND COPYRIGHT
-Copyright (c) 2009, Goro Fuji(gfx). Some rights reserved.
+Copyright (c) 2009-2010, Goro Fuji(gfx). All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace/JA.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace/JA.pod?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace/JA.pod (original)
+++ branches/upstream/libtest-leaktrace-perl/current/lib/Test/LeakTrace/JA.pod Thu Aug 5 09:47:39 2010
@@ -7,7 +7,7 @@
=head1 VERSION
-This document describes Test::LeakTrace version 0.11.
+This document describes Test::LeakTrace version 0.13.
=head1 SYNOPSIS
Modified: branches/upstream/libtest-leaktrace-perl/current/t/03_count.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/t/03_count.t?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/t/03_count.t (original)
+++ branches/upstream/libtest-leaktrace-perl/current/t/03_count.t Thu Aug 5 09:47:39 2010
@@ -12,8 +12,8 @@
$a{b} = 1;
$b{a} = 2;
}
-is leaked_count(\&normal), 0, 'not leaked(1)';
-is leaked_count(\&normal), 0, 'not leaked(2)';
+cmp_ok leaked_count(\&normal), '<=', 0, 'not leaked(1)';
+cmp_ok leaked_count(\&normal), '<=', 0, 'not leaked(2)';
sub leaked{
my %a;
Modified: branches/upstream/libtest-leaktrace-perl/current/t/10_bad_use.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-leaktrace-perl/current/t/10_bad_use.t?rev=61196&op=diff
==============================================================================
--- branches/upstream/libtest-leaktrace-perl/current/t/10_bad_use.t (original)
+++ branches/upstream/libtest-leaktrace-perl/current/t/10_bad_use.t Thu Aug 5 09:47:39 2010
@@ -7,8 +7,8 @@
for(1 .. 2){
eval{
- my $count = leaked_count{
- my $count = leaked_count{
+ my @a = leaked_refs{
+ my @b = leaked_refs{
my %a = (foo => 42);
my %b = (bar => 3.14);
More information about the Pkg-perl-cvs-commits
mailing list