[Bast-commits] r4951 - in Devel-Declare/1.000/trunk: . lib/Devel t
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Wed Oct 22 19:33:32 BST 2008
Author: rafl
Date: 2008-10-22 19:33:31 +0100 (Wed, 22 Oct 2008)
New Revision: 4951
Modified:
Devel-Declare/1.000/trunk/Makefile.PL
Devel-Declare/1.000/trunk/lib/Devel/Declare.pm
Devel-Declare/1.000/trunk/t/method-no-semi.t
Devel-Declare/1.000/trunk/t/statement.t
Log:
Merge branch 'hooks_endofscope'
* hooks_endofscope:
Use B::Hooks::EndOfScope instead of %^H and Scope::Guard.
Create branch 'hooks_op_endofscope'.
Conflicts:
Makefile.PL
Modified: Devel-Declare/1.000/trunk/Makefile.PL
===================================================================
--- Devel-Declare/1.000/trunk/Makefile.PL 2008-10-22 18:29:36 UTC (rev 4950)
+++ Devel-Declare/1.000/trunk/Makefile.PL 2008-10-22 18:33:31 UTC (rev 4951)
@@ -9,11 +9,11 @@
requires 'Scalar::Util';
requires 'B::Hooks::OP::Check' => '0.10';
-build_requires 'Test::More';
-build_requires 'Scope::Guard';
build_requires 'B::Hooks::OP::Check' => '0.10';
configure_requires 'ExtUtils::Depends';
configure_requires 'B::Hooks::OP::Check' => '0.10';
+test_requires 'Test::More';
+test_requires 'B::Hooks::EndOfScope';
postamble(<<'EOM');
$(OBJECT) : stolen_chunk_of_toke.c
Modified: Devel-Declare/1.000/trunk/lib/Devel/Declare.pm
===================================================================
--- Devel-Declare/1.000/trunk/lib/Devel/Declare.pm 2008-10-22 18:29:36 UTC (rev 4950)
+++ Devel-Declare/1.000/trunk/lib/Devel/Declare.pm 2008-10-22 18:33:31 UTC (rev 4951)
@@ -291,13 +291,13 @@
=head1 SYNOPSIS
use Devel::Declare ();
- use Scope::Guard;
{
package MethodHandlers;
use strict;
use warnings;
+ use B::Hooks::EndOfScope;
our ($Declarator, $Offset);
@@ -392,13 +392,12 @@
}
sub inject_scope {
- $^H |= 0x120000;
- $^H{DD_METHODHANDLERS} = Scope::Guard->new(sub {
+ on_scope_end {
my $linestr = Devel::Declare::get_linestr;
my $offset = Devel::Declare::get_linestr_offset;
substr($linestr, $offset, 0) = ';';
Devel::Declare::set_linestr($linestr);
- });
+ };
}
}
Modified: Devel-Declare/1.000/trunk/t/method-no-semi.t
===================================================================
--- Devel-Declare/1.000/trunk/t/method-no-semi.t 2008-10-22 18:29:36 UTC (rev 4950)
+++ Devel-Declare/1.000/trunk/t/method-no-semi.t 2008-10-22 18:33:31 UTC (rev 4951)
@@ -1,11 +1,11 @@
use Devel::Declare ();
-use Scope::Guard;
{
package MethodHandlers;
use strict;
use warnings;
+ use B::Hooks::EndOfScope;
our ($Declarator, $Offset);
@@ -100,13 +100,12 @@
}
sub inject_scope {
- $^H |= 0x120000;
- $^H{DD_METHODHANDLERS} = Scope::Guard->new(sub {
+ on_scope_end {
my $linestr = Devel::Declare::get_linestr;
my $offset = Devel::Declare::get_linestr_offset;
substr($linestr, $offset, 0) = ';';
Devel::Declare::set_linestr($linestr);
- });
+ };
}
}
Modified: Devel-Declare/1.000/trunk/t/statement.t
===================================================================
--- Devel-Declare/1.000/trunk/t/statement.t 2008-10-22 18:29:36 UTC (rev 4950)
+++ Devel-Declare/1.000/trunk/t/statement.t 2008-10-22 18:33:31 UTC (rev 4951)
@@ -1,12 +1,12 @@
use Devel::Declare ();
use Test::More qw(no_plan);
-use Scope::Guard;
{
package FoomHandlers;
use strict;
use warnings;
+ use B::Hooks::EndOfScope;
our ($Declarator, $Offset);
@@ -80,13 +80,12 @@
}
sub inject_scope {
- $^H |= 0x120000;
- $^H{DD_FOOMHANDLERS} = Scope::Guard->new(sub {
+ on_scope_end {
my $linestr = Devel::Declare::get_linestr;
my $offset = Devel::Declare::get_linestr_offset;
substr($linestr, $offset, 0) = ';';
Devel::Declare::set_linestr($linestr);
- });
+ };
}
package Foo;
More information about the Bast-commits
mailing list