From e55970bce6430bcc6cd014bc46983c100f660e79 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 26 Aug 2010 22:13:30 -0500 Subject: cache the ref to the stash --- t/02-extension.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 't/02-extension.t') diff --git a/t/02-extension.t b/t/02-extension.t index 2f95f15..f639cfa 100644 --- a/t/02-extension.t +++ b/t/02-extension.t @@ -13,8 +13,11 @@ use Test::Exception; use Symbol 'gensym'; - sub namespace { - $_[0]->{namespace} ||= {} + sub new { + my $class = shift; + my $self = $class->SUPER::new(@_); + $self->{namespace} = {}; + return $self; } sub add_package_symbol { -- cgit v1.2.3-54-g00ecf