r29323 - in /trunk/libb-hooks-endofscope-perl: Changes MANIFEST META.yml Makefile.PL README debian/changelog inc/Module/Install/ExtraTests.pm lib/B/Hooks/EndOfScope.pm t/eval.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Mon Jan 5 14:32:12 UTC 2009


Author: gregoa
Date: Mon Jan  5 14:32:09 2009
New Revision: 29323

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

Added:
    trunk/libb-hooks-endofscope-perl/t/eval.t
      - copied unchanged from r29322, branches/upstream/libb-hooks-endofscope-perl/current/t/eval.t
Modified:
    trunk/libb-hooks-endofscope-perl/Changes
    trunk/libb-hooks-endofscope-perl/MANIFEST
    trunk/libb-hooks-endofscope-perl/META.yml
    trunk/libb-hooks-endofscope-perl/Makefile.PL
    trunk/libb-hooks-endofscope-perl/README
    trunk/libb-hooks-endofscope-perl/debian/changelog
    trunk/libb-hooks-endofscope-perl/inc/Module/Install/ExtraTests.pm
    trunk/libb-hooks-endofscope-perl/lib/B/Hooks/EndOfScope.pm

Modified: trunk/libb-hooks-endofscope-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-hooks-endofscope-perl/Changes?rev=29323&op=diff
==============================================================================
--- trunk/libb-hooks-endofscope-perl/Changes (original)
+++ trunk/libb-hooks-endofscope-perl/Changes Mon Jan  5 14:32:09 2009
@@ -1,3 +1,9 @@
+0.05  Sun, 04 Jan 2009 20:46:07 +0100
+  * Use Variable::Magic and cast %^H instead Scope::Guard and relying
+    on a timely destruction of objects within %^H. This fixes using
+    on_scope_end in blocks where string evals are compiled as those
+    increment the refcount of objects in %^H on 5.10.
+
 0.04  Mon, 20 Oct 2008 12:56:23 +0200
   * Remove an unused bit from the $^H mask.
 

Modified: trunk/libb-hooks-endofscope-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-hooks-endofscope-perl/MANIFEST?rev=29323&op=diff
==============================================================================
--- trunk/libb-hooks-endofscope-perl/MANIFEST (original)
+++ trunk/libb-hooks-endofscope-perl/MANIFEST Mon Jan  5 14:32:09 2009
@@ -15,5 +15,6 @@
 META.yml
 README
 t/basic.t
+t/eval.t
 xt/author/pod.t
 xt/author/podcoverage.t

Modified: trunk/libb-hooks-endofscope-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-hooks-endofscope-perl/META.yml?rev=29323&op=diff
==============================================================================
--- trunk/libb-hooks-endofscope-perl/META.yml (original)
+++ trunk/libb-hooks-endofscope-perl/META.yml Mon Jan  5 14:32:09 2009
@@ -16,9 +16,9 @@
     - inc
     - t
 requires:
-  Scope::Guard: 0
   Sub::Exporter: 0
+  Variable::Magic: 0
   perl: 5.8.0
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.04
+version: 0.05

Modified: trunk/libb-hooks-endofscope-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-hooks-endofscope-perl/Makefile.PL?rev=29323&op=diff
==============================================================================
--- trunk/libb-hooks-endofscope-perl/Makefile.PL (original)
+++ trunk/libb-hooks-endofscope-perl/Makefile.PL Mon Jan  5 14:32:09 2009
@@ -5,7 +5,7 @@
 name 'B-Hooks-EndOfScope';
 all_from 'lib/B/Hooks/EndOfScope.pm';
 
-requires 'Scope::Guard';
+requires 'Variable::Magic';
 requires 'Sub::Exporter';
 test_requires 'Test::More';
 

Modified: trunk/libb-hooks-endofscope-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-hooks-endofscope-perl/README?rev=29323&op=diff
==============================================================================
--- trunk/libb-hooks-endofscope-perl/README (original)
+++ trunk/libb-hooks-endofscope-perl/README Mon Jan  5 14:32:09 2009
@@ -22,7 +22,7 @@
 SEE ALSO
     Sub::Exporter
 
-    Scope::Guard
+    Variable::Magic
 
 AUTHOR
     Florian Ragwitz <rafl at debian.org>

Modified: trunk/libb-hooks-endofscope-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-hooks-endofscope-perl/debian/changelog?rev=29323&op=diff
==============================================================================
--- trunk/libb-hooks-endofscope-perl/debian/changelog (original)
+++ trunk/libb-hooks-endofscope-perl/debian/changelog Mon Jan  5 14:32:09 2009
@@ -1,5 +1,6 @@
-libb-hooks-endofscope-perl (0.04-2) UNRELEASED; urgency=low
+libb-hooks-endofscope-perl (0.05-1) UNRELEASED; urgency=low
 
+  * New upstream release.
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
 

Modified: trunk/libb-hooks-endofscope-perl/inc/Module/Install/ExtraTests.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-hooks-endofscope-perl/inc/Module/Install/ExtraTests.pm?rev=29323&op=diff
==============================================================================
--- trunk/libb-hooks-endofscope-perl/inc/Module/Install/ExtraTests.pm (original)
+++ trunk/libb-hooks-endofscope-perl/inc/Module/Install/ExtraTests.pm Mon Jan  5 14:32:09 2009
@@ -6,7 +6,7 @@
 use Module::Install::Base;
 
 BEGIN {
-  our $VERSION = '0.003';
+  our $VERSION = '0.006';
   our $ISCORE  = 1;
   our @ISA     = qw{Module::Install::Base};
 }
@@ -14,7 +14,7 @@
 sub extra_tests {
   my ($self) = @_;
 
-  die "extra_tests requested, but no ./xt exists\n" unless -d 'xt';
+  return unless -d 'xt';
   return unless my @content = grep { $_ =~ /^[.]/ } <xt/*>;
 
   die "unknown files found in ./xt" if grep { -f } @content;
@@ -66,7 +66,7 @@
   # out on the command line can blow over its exec limit.
   require ExtUtils::Command;
   push @ARGV, __PACKAGE__->_deep_t($author_tests)
-    if $author_tests and $is_author;
+    if $author_tests and (exists $ENV{AUTHOR_TESTING} ? $ENV{AUTHOR_TESTING} : $is_author);
 
   push @ARGV, __PACKAGE__->_deep_t($release_tests)
     if $release_tests and $ENV{RELEASE_TESTING};

Modified: trunk/libb-hooks-endofscope-perl/lib/B/Hooks/EndOfScope.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-hooks-endofscope-perl/lib/B/Hooks/EndOfScope.pm?rev=29323&op=diff
==============================================================================
--- trunk/libb-hooks-endofscope-perl/lib/B/Hooks/EndOfScope.pm (original)
+++ trunk/libb-hooks-endofscope-perl/lib/B/Hooks/EndOfScope.pm Mon Jan  5 14:32:09 2009
@@ -4,11 +4,9 @@
 package B::Hooks::EndOfScope;
 
 use 5.008000;
-use Scope::Guard;
+use Variable::Magic;
 
-our $VERSION = '0.04';
-
-our $SCOPE_HOOK_KEY = 'SCOPE_END_HOOK';
+our $VERSION = '0.05';
 
 use Sub::Exporter -setup => {
     exports => ['on_scope_end'],
@@ -43,18 +41,30 @@
 
 =cut
 
-sub on_scope_end (&) {
-    my $cb = shift;
+{
+    my $wiz = Variable::Magic::wizard
+        data => sub { [$_[1]] },
+        free => sub { $_->() for @{ $_[1] }; () };
 
-    $^H |= 0x020000;
-    $^H{ $SCOPE_HOOK_KEY } = [Scope::Guard->new($cb), @{ $^H{ $SCOPE_HOOK_KEY } || [] }];
+    sub on_scope_end (&) {
+        my $cb = shift;
+
+        $^H |= 0x020000;
+
+        if (my $stack = Variable::Magic::getdata %^H, $wiz) {
+            push @{ $stack }, $cb;
+        }
+        else {
+            Variable::Magic::cast %^H, $wiz, $cb;
+        }
+    }
 }
 
 =head1 SEE ALSO
 
 L<Sub::Exporter>
 
-L<Scope::Guard>
+L<Variable::Magic>
 
 =head1 AUTHOR
 




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