diff options
Diffstat (limited to 'lib/Reply/Plugin/LexicalPersistence.pm')
-rw-r--r-- | lib/Reply/Plugin/LexicalPersistence.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Reply/Plugin/LexicalPersistence.pm b/lib/Reply/Plugin/LexicalPersistence.pm index 415f5a9..990fd70 100644 --- a/lib/Reply/Plugin/LexicalPersistence.pm +++ b/lib/Reply/Plugin/LexicalPersistence.pm @@ -21,7 +21,7 @@ then use C<$x> as expected in subsequent lines. =cut class Reply::Plugin::LexicalPersistence extends Reply::Plugin { - has $env = {}; + has $!env = {}; method compile ($next, $line, %args) { my ($code) = $next->($line, %args); @@ -29,12 +29,12 @@ class Reply::Plugin::LexicalPersistence extends Reply::Plugin { my $new_env = peek_sub($code); delete $new_env->{$_} for keys %{ closed_over($code) }; - $env = { %$env, %$new_env }; + $!env = { %{$!env}, %$new_env }; return $code; } - method lexical_environment { $env } + method lexical_environment { $!env } } 1; |