From: Jesse Luehrs Date: Sun, 13 Jun 2010 16:44:14 +0000 (-0500) Subject: vivify the storage var manually X-Git-Tag: 0.18~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5460fcfb77326c9e5f10b6f6961b4e3eb96e6dd2;p=p5sagit%2Fnamespace-clean.git vivify the storage var manually --- diff --git a/lib/namespace/clean.pm b/lib/namespace/clean.pm index eccd295..156bde0 100644 --- a/lib/namespace/clean.pm +++ b/lib/namespace/clean.pm @@ -278,7 +278,10 @@ information about function names included and excluded from removal. sub get_class_store { my ($pragma, $class) = @_; my $stash = Package::Stash->new($class); - return $stash->get_package_symbol("%$STORAGE_VAR"); + my $var = "%$STORAGE_VAR"; + $stash->add_package_symbol($var, {}) + unless $stash->has_package_symbol($var); + return $stash->get_package_symbol($var); } =method get_functions