r73343 - in /branches/upstream/libmodule-refresh-perl/current: Changes MANIFEST Makefile.PL SIGNATURE debian/ lib/Module/Refresh.pm t/clear_symtable.t

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Sat Apr 23 22:23:41 UTC 2011


Author: periapt-guest
Date: Sat Apr 23 22:23:12 2011
New Revision: 73343

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73343
Log:
[svn-upgrade] new version libmodule-refresh-perl (0.16)

Added:
    branches/upstream/libmodule-refresh-perl/current/t/clear_symtable.t
Removed:
    branches/upstream/libmodule-refresh-perl/current/debian/
Modified:
    branches/upstream/libmodule-refresh-perl/current/Changes
    branches/upstream/libmodule-refresh-perl/current/MANIFEST
    branches/upstream/libmodule-refresh-perl/current/Makefile.PL
    branches/upstream/libmodule-refresh-perl/current/SIGNATURE
    branches/upstream/libmodule-refresh-perl/current/lib/Module/Refresh.pm

Modified: branches/upstream/libmodule-refresh-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-refresh-perl/current/Changes?rev=73343&op=diff
==============================================================================
--- branches/upstream/libmodule-refresh-perl/current/Changes (original)
+++ branches/upstream/libmodule-refresh-perl/current/Changes Sat Apr 23 22:23:12 2011
@@ -1,3 +1,14 @@
+0.16 Fri Apr 15 15:03:21 EST 2011
+ 
+ * SIGNATURE file bug
+
+0.15 Fri Apr 15 15:00:15 EST 2011
+
+ * No functional changes. Added missing test dependencies. Thanks to JQUELIN & Paul at City Fan
+
+0.14 Tue Apr 12 18:07:44 EST 2011
+
+ * Actually remove subroutines from the symbol table, Thanks to DOY.
 
 0.13 Thu May  3 23:03:00 EDT 2007
 

Modified: branches/upstream/libmodule-refresh-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-refresh-perl/current/MANIFEST?rev=73343&op=diff
==============================================================================
--- branches/upstream/libmodule-refresh-perl/current/MANIFEST (original)
+++ branches/upstream/libmodule-refresh-perl/current/MANIFEST Sat Apr 23 22:23:12 2011
@@ -1,4 +1,3 @@
-SIGNATURE 
 Changes
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
@@ -12,6 +11,8 @@
 Makefile.PL
 MANIFEST			This list of files
 META.yml
+SIGNATURE
 t/0-smoke.t
 t/1api.t
 t/2lateuse.t
+t/clear_symtable.t

Modified: branches/upstream/libmodule-refresh-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-refresh-perl/current/Makefile.PL?rev=73343&op=diff
==============================================================================
--- branches/upstream/libmodule-refresh-perl/current/Makefile.PL (original)
+++ branches/upstream/libmodule-refresh-perl/current/Makefile.PL Sat Apr 23 22:23:12 2011
@@ -6,6 +6,7 @@
 version_from('lib/Module/Refresh.pm');
 abstract_from('lib/Module/Refresh.pm');
 build_requires ('Test::More' => 0,
-                'File::Temp' => 0,
+                'Path::Class' => 0,
+                'File::Temp' => "0.19",
                 );
 &WriteAll;

Modified: branches/upstream/libmodule-refresh-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-refresh-perl/current/SIGNATURE?rev=73343&op=diff
==============================================================================
--- branches/upstream/libmodule-refresh-perl/current/SIGNATURE (original)
+++ branches/upstream/libmodule-refresh-perl/current/SIGNATURE Sat Apr 23 22:23:12 2011
@@ -1,5 +1,5 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.55.
+signed via the Module::Signature module, version 0.66.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
@@ -14,10 +14,10 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 438345ffc5d5f0479eefa4cc9260370ea8f65aab Changes
-SHA1 bfc39e0aa86b3dae153290cb4cbf5a89126f9f97 MANIFEST
+SHA1 3b6b523dfd11a462961d22ce70b78ae6df5fae7d Changes
+SHA1 68778c52d10c41f67e469665dd332886a6c628e6 MANIFEST
 SHA1 b7486e3cbe8cb200c626c9c5c8e0a16b13affb0c META.yml
-SHA1 67db1c195cf3a6397112cbb3639553e7d3bd8bab Makefile.PL
+SHA1 2a1de49cf5174c72b89629051e8de4ac05b05bd4 Makefile.PL
 SHA1 0de53a33616127f8680e6e4118741e80f354cd3e inc/Module/Install.pm
 SHA1 11d43fa1484b63eb90b0a3a1b62dcb7e71060084 inc/Module/Install/Base.pm
 SHA1 d3122b9f825c49da1184636699531ac0a7844da0 inc/Module/Install/Can.pm
@@ -26,14 +26,15 @@
 SHA1 2d0fae3f1ecf71666075b39911cb4694b1310edd inc/Module/Install/Metadata.pm
 SHA1 71c0f2e04d98c302c22d92b03ab8852f768b6431 inc/Module/Install/Win32.pm
 SHA1 ea6fe523768b5c7d8a50528fbc18885bb0901d88 inc/Module/Install/WriteAll.pm
-SHA1 c88add27b6483854d01541dca6380684867a708f lib/Module/Refresh.pm
+SHA1 a1e63fe6eb40f7c1429887654ef0c273e1e15420 lib/Module/Refresh.pm
 SHA1 59ee3fb5cc33fa83f37010c6f1bbffc96169c3d4 t/0-smoke.t
 SHA1 9103ce09992aa9abff57823a090e109b1e9511a5 t/1api.t
 SHA1 d6fce094ee7fb7e800f646ac216dcc4a8a45f7db t/2lateuse.t
+SHA1 ca479c7b8ae0997a66d18c00216ac44c1346cbc4 t/clear_symtable.t
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.3 (Darwin)
+Version: GnuPG v1.4.11 (GNU/Linux)
 
-iD8DBQFGOqKFEi9d9xCOQEYRAoWXAJ4spQ1ypCjAuWo1MWapFzZtVfaOQACgvXij
-TlnS18WFtiV3eVLEUl7yPdA=
-=0mXn
+iEYEARECAAYFAk2n0bQACgkQEi9d9xCOQEaiHQCfb9SPMjZShk3f/Q1Yb9kBbCyk
+6qYAn0uFvaSX2gC6Os7WW+WkjWH2OBZW
+=H1/Q
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libmodule-refresh-perl/current/lib/Module/Refresh.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-refresh-perl/current/lib/Module/Refresh.pm?rev=73343&op=diff
==============================================================================
--- branches/upstream/libmodule-refresh-perl/current/lib/Module/Refresh.pm (original)
+++ branches/upstream/libmodule-refresh-perl/current/lib/Module/Refresh.pm Sat Apr 23 22:23:12 2011
@@ -3,7 +3,7 @@
 use strict;
 use vars qw( $VERSION %CACHE );
 
-$VERSION = "0.13";
+$VERSION = "0.16";
 
 BEGIN {
 
@@ -177,10 +177,16 @@
     foreach my $sym ( grep { index( $DB::sub{$_}, "$file:" ) == 0 }
         keys %DB::sub )
     {
+
         warn "Deleting $sym from $file" if ( $sym =~ /freeze/ );
         eval { undef &$sym };
         warn "$sym: $@" if $@;
         delete $DB::sub{$sym};
+        { no strict 'refs';
+            if ($sym =~ /^(.*::)(.*?)$/) {
+                delete *{$1}->{$2};
+            }
+        } 
     }
 
     return $self;
@@ -205,8 +211,9 @@
 
 =head1 BUGS
 
-When we walk the symbol table to whack reloaded subroutines, we don't have a good way
-to invalidate the symbol table.
+When we walk the symbol table to whack reloaded subroutines, we don't
+have a good way to invalidate the symbol table properly, so we mess up
+on things like global variables that were previously set.
 
 =head1 SEE ALSO
 
@@ -214,8 +221,8 @@
 
 =head1 COPYRIGHT
 
-Copyright 2004 by Jesse Vincent E<lt>jesse at bestpractical.comE<gt>,
-Autrijus Tang E<lt>autrijus at autrijus.orgE<gt>
+Copyright 2004,2011 by Jesse Vincent E<lt>jesse at bestpractical.comE<gt>,
+Audrey Tang E<lt>audreyt at audreyt.orgE<gt>
 
 This program is free software; you can redistribute it and/or 
 modify it under the same terms as Perl itself.

Added: branches/upstream/libmodule-refresh-perl/current/t/clear_symtable.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmodule-refresh-perl/current/t/clear_symtable.t?rev=73343&op=file
==============================================================================
--- branches/upstream/libmodule-refresh-perl/current/t/clear_symtable.t (added)
+++ branches/upstream/libmodule-refresh-perl/current/t/clear_symtable.t Sat Apr 23 22:23:12 2011
@@ -1,0 +1,49 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+use Module::Refresh;
+
+use File::Temp;
+use Path::Class;
+
+my $dir = File::Temp->newdir;
+push @INC, $dir->dirname;
+
+dir($dir)->file('Foo.pm')->openw->print(<<'PM');
+package Foo;
+sub bar { }
+1;
+PM
+
+require Foo;
+
+Module::Refresh->refresh;
+
+can_ok('Foo', 'bar');
+ok(!Foo->can('baz'), "!Foo->can('baz')");
+
+sleep 2;
+
+dir($dir)->file('Foo.pm')->openw->print(<<'PM');
+package Foo;
+sub baz { }
+1;
+PM
+
+Module::Refresh->refresh;
+
+can_ok('Foo', 'baz');
+ok(!Foo->can('bar'), "!Foo->can('bar')");
+
+done_testing;
+__END__
+ok 1 - Foo->can('bar')
+ok 2 - !Foo->can('baz')
+ok 3 - Foo->can('baz')
+not ok 4 - !Foo->can('bar')
+#   Failed test '!Foo->can('bar')'
+#   at test.pl line 38.
+1..4
+# Looks like you failed 1 test of 4.




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