r64966 - in /branches/upstream/libtest-weaken-perl/current: Changes MANIFEST.SKIP META.yml author.t/critic.t lib/Test/Weaken.pm
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Wed Nov 17 12:07:11 UTC 2010
Author: periapt-guest
Date: Wed Nov 17 12:06:49 2010
New Revision: 64966
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64966
Log:
[svn-upgrade] new version libtest-weaken-perl (3.006000)
Modified:
branches/upstream/libtest-weaken-perl/current/Changes
branches/upstream/libtest-weaken-perl/current/MANIFEST.SKIP
branches/upstream/libtest-weaken-perl/current/META.yml
branches/upstream/libtest-weaken-perl/current/author.t/critic.t
branches/upstream/libtest-weaken-perl/current/lib/Test/Weaken.pm
Modified: branches/upstream/libtest-weaken-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-weaken-perl/current/Changes?rev=64966&op=diff
==============================================================================
--- branches/upstream/libtest-weaken-perl/current/Changes (original)
+++ branches/upstream/libtest-weaken-perl/current/Changes Wed Nov 17 12:06:49 2010
@@ -1,4 +1,8 @@
Revision history for Test-Weaken
+
+3.006000 Mon Nov 15 20:52:06 2010
+ * Documentation changes
+ * Added Test::Weaken::Gtk2 to SEE ALSO
3.004000 Sun May 16 15:36:51 2010
* Ticket 56722:
Modified: branches/upstream/libtest-weaken-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-weaken-perl/current/MANIFEST.SKIP?rev=64966&op=diff
==============================================================================
--- branches/upstream/libtest-weaken-perl/current/MANIFEST.SKIP (original)
+++ branches/upstream/libtest-weaken-perl/current/MANIFEST.SKIP Wed Nov 17 12:06:49 2010
@@ -1,8 +1,9 @@
-/\.svn/*
^Makefile$
^Test-Weaken-[0-9].[0-9]{3}_[0-9]{3}/
^Test-Weaken-[0-9].[0-9]{6}/
+^[.]git/*
^\.svn/
+^author[.]t/[.]gitignore$
^author\.t/display\.errs$
^author\.t/perlcritic\.errs$
^blib/
Modified: branches/upstream/libtest-weaken-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-weaken-perl/current/META.yml?rev=64966&op=diff
==============================================================================
--- branches/upstream/libtest-weaken-perl/current/META.yml (original)
+++ branches/upstream/libtest-weaken-perl/current/META.yml Wed Nov 17 12:06:49 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Test-Weaken
-version: 3.004000
+version: 3.006000
abstract: Test that freed memory objects were, indeed, freed
author:
- Jeffrey Kegler
@@ -21,7 +21,7 @@
provides:
Test::Weaken:
file: lib/Test/Weaken.pm
- version: 3.004000
+ version: 3.006000
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.3.html
version: 1.3
Modified: branches/upstream/libtest-weaken-perl/current/author.t/critic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-weaken-perl/current/author.t/critic.t?rev=64966&op=diff
==============================================================================
--- branches/upstream/libtest-weaken-perl/current/author.t/critic.t (original)
+++ branches/upstream/libtest-weaken-perl/current/author.t/critic.t Wed Nov 17 12:06:49 2010
@@ -15,7 +15,14 @@
sub run_critic {
my $file = shift;
- my @cmd = qw(perlcritic -profile author.t/perlcriticrc);
+ my @cmd = (
+ #<<< perltidy messes this up
+ 'perlcritic',
+ '--verbose', '%l:%c %p %r\n',
+ '--exclude', 'Dynamic::*',
+ '-profile', 'author.t/perlcriticrc',
+ #>>>
+ );
push @cmd, $file;
my ( $child_out, $child_in );
@@ -33,7 +40,7 @@
if (WIFEXITED(
## perlcritic does not seem to understand what CHILD_ERROR_NATIVE is
- ## no critic (Subroutines::ProhibitCallsToUndeclaredSubs)
+ ## no critic (Variables::ProhibitPunctuationVars)
${^CHILD_ERROR_NATIVE}
## use critic
) != 1
Modified: branches/upstream/libtest-weaken-perl/current/lib/Test/Weaken.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-weaken-perl/current/lib/Test/Weaken.pm?rev=64966&op=diff
==============================================================================
--- branches/upstream/libtest-weaken-perl/current/lib/Test/Weaken.pm (original)
+++ branches/upstream/libtest-weaken-perl/current/lib/Test/Weaken.pm Wed Nov 17 12:06:49 2010
@@ -7,7 +7,7 @@
use base qw(Exporter);
our @EXPORT_OK = qw(leaks poof);
-our $VERSION = '3.004000';
+our $VERSION = '3.006000';
# use Smart::Comments;
@@ -469,7 +469,8 @@
my $array_context = wantarray;
my $before_weak =
- ( ref $probe_ref eq 'REF' and Scalar::Util::isweak( ${$probe_ref} ) );
+ ( ref $probe_ref eq 'REF'
+ and Scalar::Util::isweak( ${$probe_ref} ) );
my $before_dump =
Data::Dumper->new( [$probe_ref], [qw(proberef)] )
->Maxdepth($compare_depth)->Dump();
@@ -496,7 +497,8 @@
}
my $after_weak =
- ( ref $probe_ref eq 'REF' and Scalar::Util::isweak( ${$probe_ref} ) );
+ ( ref $probe_ref eq 'REF'
+ and Scalar::Util::isweak( ${$probe_ref} ) );
my $after_dump =
Data::Dumper->new( [$probe_ref], [qw(proberef)] )
->Maxdepth($compare_depth)->Dump();
@@ -688,12 +690,21 @@
In this document,
a Perl B<data structure> (often just called a B<structure>)
is any group of Perl objects that are
-B<co-mortal> -- expected to be destroyed at the same time.
+co-mortal.
+B<Co-mortal> means that the maintainer
+expects those objects to be destroyed at the same time.
+For example, if a group of Perl objects is referenced,
+directly or indirectly,
+through a hash,
+and is referenced only through that hash,
+a programmer will usually expect all of those objects
+to be destroyed when the hash is.
+
+Perl data structures can be any set of
+Perl data objects.
Since the question is one of I<expected> lifetime,
whether an object is part of a data structure
is, in the last analysis, subjective.
-Perl data structures can be any set of
-Perl data objects.
=head2 The Contents of a Data Structure
@@ -732,10 +743,10 @@
A data object is considered to be a descendant of itself,
and also to be one of its own ancestors.
-L<Test::Weaken|/"NAME">'s default assumption,
+L<Test::Weaken|/"NAME">'s default assumption is
that the contents of a data structure are the same as
-its descendants, works
-for many cases,
+its descendants.
+This works for many cases,
but not for all.
Ways to deal with
descendants that are not contents,
@@ -825,10 +836,11 @@
of the lab rat.
It is not always easy to find the right objects to put into the wrapper array.
-In particular, determining the contents of the lab rat may
-require what
-amounts to a recursive scan of the descendants of the lab rat's
+For example, determining the contents of the lab rat may
+require a recursive scan from the lab rat's
top object.
+Depending on the logical structure of the lab rat,
+this may be far from trivial.
As an alternative to using a wrapper,
it is possible to have L<Test::Weaken|/"NAME"> add
@@ -1832,13 +1844,29 @@
=head1 SEE ALSO
-Potential users will want to compare L<Test::Memory::Cycle> and
-L<Devel::Cycle>, which examine
-existing data structures non-destructively.
-L<Devel::Leak> also covers similar ground, although it requires
-Perl to be compiled with C<-DDEBUGGING> in order to work. L<Devel::Cycle>
-looks inside closures if PadWalker is present, a feature L<Test::Weaken|/"NAME">
-does not have at present.
+L<Test::Weaken|/"NAME">
+at this point is robust
+and has
+seen extensive use.
+Its tracking of memory is careful enough
+that it has even stumbled upon
+L<a bug in perl
+itself|http://rt.perl.org/rt3/Public/Bug/Display.html?id=67838>.
+
+L<Test::Weaken::Gtk2>
+is a CPAN Module of "helper" functions
+for L<Test::Weaken|/"NAME">.
+L<Test::Weaken::Gtk2>
+is specifically aimed at the needs of users
+of L<Gtk2>,
+but can also be used
+as an example of how
+an expert user extends and adapts
+L<Test::Weaken|/"NAME">.
+Kevin Ryde, the author of
+L<Test::Weaken::Gtk2>,
+has been a important contributor to
+L<Test::Weaken|/"NAME">.
=head1 ACKNOWLEDGEMENTS
@@ -1853,7 +1881,7 @@
=head1 LICENSE AND COPYRIGHT
-Copyright 2007-2009 Jeffrey Kegler, all rights reserved.
+Copyright 2010 Jeffrey Kegler, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl 5.10.
More information about the Pkg-perl-cvs-commits
mailing list