[Catalyst-commits] r8110 - in trunk/CatalystX-Imports: .
lib/CatalystX
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sun Jul 13 13:39:21 BST 2008
Author: rafl
Date: 2008-07-13 13:39:20 +0100 (Sun, 13 Jul 2008)
New Revision: 8110
Modified:
trunk/CatalystX-Imports/Makefile.PL
trunk/CatalystX-Imports/lib/CatalystX/Imports.pm
Log:
Use Scope::Guard and %^H instead of Filter::EOF.
Modified: trunk/CatalystX-Imports/Makefile.PL
===================================================================
--- trunk/CatalystX-Imports/Makefile.PL 2008-07-13 12:38:48 UTC (rev 8109)
+++ trunk/CatalystX-Imports/Makefile.PL 2008-07-13 12:39:20 UTC (rev 8110)
@@ -15,7 +15,7 @@
build_requires q{HTTP::Request}, 0;
requires q{Carp::Clan}, 0;
-requires q{Filter::EOF}, '0.02';
+requires q{Scope::Guard}, 0;
requires q{Class::Inspector}, 0;
requires q{List::MoreUtils}, '0.19';
requires q{Scalar::Util}, '1.19';
Modified: trunk/CatalystX-Imports/lib/CatalystX/Imports.pm
===================================================================
--- trunk/CatalystX-Imports/lib/CatalystX/Imports.pm 2008-07-13 12:38:48 UTC (rev 8109)
+++ trunk/CatalystX-Imports/lib/CatalystX/Imports.pm 2008-07-13 12:39:20 UTC (rev 8110)
@@ -17,8 +17,10 @@
use Class::Inspector;
use Carp::Clan qw{ ^CatalystX::Imports(?:::|$) };
-use Filter::EOF;
+use Scope::Guard;
+our $SCOPE_GUARD = 'CatalystX-Imports-Guard';
+
=head1 VERSION
0.01
@@ -134,9 +136,10 @@
my $caller = scalar caller;
# call install_action_wrap_into after package runtime
- Filter::EOF->on_eof_call( sub {
- my $eof = shift;
- $$eof = "; ${class}->install_action_wrap_into('${caller}'); 1;";
+ $^H |= 0x120000;
+
+ $^H{ $SCOPE_GUARD } = Scope::Guard->new(sub {
+ $class->install_action_wrap_into($caller);
});
# call current export mechanism
More information about the Catalyst-commits
mailing list