r18529 - in /trunk/libdevel-cycle-perl: Changes META.yml debian/changelog lib/Devel/Cycle.pm t/Devel-Cycle.t

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sat Apr 12 19:46:25 UTC 2008


Author: gregoa-guest
Date: Sat Apr 12 19:46:24 2008
New Revision: 18529

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=18529
Log:
New upstream release.

Modified:
    trunk/libdevel-cycle-perl/Changes
    trunk/libdevel-cycle-perl/META.yml
    trunk/libdevel-cycle-perl/debian/changelog
    trunk/libdevel-cycle-perl/lib/Devel/Cycle.pm
    trunk/libdevel-cycle-perl/t/Devel-Cycle.t

Modified: trunk/libdevel-cycle-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-cycle-perl/Changes?rev=18529&op=diff
==============================================================================
--- trunk/libdevel-cycle-perl/Changes (original)
+++ trunk/libdevel-cycle-perl/Changes Sat Apr 12 19:46:24 2008
@@ -1,4 +1,7 @@
 Revision history for Perl extension Devel::Cycle.
+1.08 Fri Apr 11 17:55:59 EDT 2008
+     	- Peter Brakemeier identified and patched bug in which stringified objects could
+           create false positives. Thanks Peter!
 
 1.07 Tue May 23 22:28:03 EDT 2006
 	- Fixed export_to_level() problem so that Test::Memory::Cycle works again.

Modified: trunk/libdevel-cycle-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-cycle-perl/META.yml?rev=18529&op=diff
==============================================================================
--- trunk/libdevel-cycle-perl/META.yml (original)
+++ trunk/libdevel-cycle-perl/META.yml Sat Apr 12 19:46:24 2008
@@ -1,11 +1,14 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Devel-Cycle
-version:      1.07
-version_from: lib/Devel/Cycle.pm
-installdirs:  site
-requires:
+--- #YAML:1.0
+name:                Devel-Cycle
+version:             1.08
+abstract:            Find memory cycles in objects
+license:             ~
+author:              
+    - Lincoln Stein <lstein at cshl.edu>
+generated_by:        ExtUtils::MakeMaker version 6.44
+distribution_type:   module
+requires:     
     Scalar::Util:                  0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+meta-spec:
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: trunk/libdevel-cycle-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-cycle-perl/debian/changelog?rev=18529&op=diff
==============================================================================
--- trunk/libdevel-cycle-perl/debian/changelog (original)
+++ trunk/libdevel-cycle-perl/debian/changelog Sat Apr 12 19:46:24 2008
@@ -1,3 +1,9 @@
+libdevel-cycle-perl (1.08-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at>  Sat, 12 Apr 2008 21:45:19 +0200
+
 libdevel-cycle-perl (1.07-2) unstable; urgency=low
 
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field

Modified: trunk/libdevel-cycle-perl/lib/Devel/Cycle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-cycle-perl/lib/Devel/Cycle.pm?rev=18529&op=diff
==============================================================================
--- trunk/libdevel-cycle-perl/lib/Devel/Cycle.pm (original)
+++ trunk/libdevel-cycle-perl/lib/Devel/Cycle.pm Sat Apr 12 19:46:24 2008
@@ -1,12 +1,12 @@
 package Devel::Cycle;
-# $Id: Cycle.pm,v 1.10 2006/05/24 02:29:32 lstein Exp $
+# $Id: Cycle.pm,v 1.11 2008/04/11 21:57:13 lstein Exp $
 
 use 5.006001;
 use strict;
 use Carp 'croak','carp';
 use warnings;
 
-use Scalar::Util qw(isweak blessed);
+use Scalar::Util qw(isweak blessed refaddr);
 
 my $SHORT_NAME = 'A';
 my %SHORT_NAMES;
@@ -17,7 +17,7 @@
 our @ISA = qw(Exporter);
 our @EXPORT = qw(find_cycle find_weakened_cycle);
 our @EXPORT_OK = qw($FORMATTING);
-our $VERSION = '1.07';
+our $VERSION = '1.08';
 our $FORMATTING = 'roasted';
 our $QUIET   = 0;
 
@@ -88,11 +88,11 @@
   # so the test has to happen directly on the reference in the data
   # structure being scanned.
 
-  if ($seenit->{$current}) {
+  if ($seenit->{refaddr $current}) {
     $callback->(\@report);
     return;
   }
-  $seenit->{$current}++;
+  $seenit->{refaddr $current}++;
 
   my $type = _get_type($current);
 

Modified: trunk/libdevel-cycle-perl/t/Devel-Cycle.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-cycle-perl/t/Devel-Cycle.t?rev=18529&op=diff
==============================================================================
--- trunk/libdevel-cycle-perl/t/Devel-Cycle.t (original)
+++ trunk/libdevel-cycle-perl/t/Devel-Cycle.t Sat Apr 12 19:46:24 2008
@@ -5,7 +5,7 @@
 
 # change 'tests => 1' to 'tests => last_test_to_print';
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 use Scalar::Util qw(weaken isweak);
 BEGIN { use_ok('Devel::Cycle') };
 
@@ -57,3 +57,15 @@
 find_weakened_cycle($test,sub {$counter++});
 is($counter,4,'found four cycles (including weakened ones) in $test after second weaken()');
 
+my $a = bless {},'foo';
+my $b = bless {},'bar';
+$a->{'b'} = $b;
+$counter = 0;
+find_cycle($a,sub {$counter++});
+is($counter,0,'found no cycles in reference stringified on purpose to create a false alarm');
+
+package foo;
+use overload q("") => sub{ return 1 };  # show false alarm
+
+package bar;
+use overload q("") => sub{ return 1 };




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