summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/ResultCache.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-08 14:13:31 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-08 14:13:31 -0500
commit41f767bb6fa8f33b2f4ace0b909969dbcbbc37d5 (patch)
tree6696ba70c2574abd204b574aca57da96548f457f /lib/Reply/Plugin/ResultCache.pm
parentb96eeb3ff1799f1f06dbd2cd9aad8bf9be81df89 (diff)
downloadreply-41f767bb6fa8f33b2f4ace0b909969dbcbbc37d5.tar.gz
reply-41f767bb6fa8f33b2f4ace0b909969dbcbbc37d5.zip
allow multiple independent lexical environments
Diffstat (limited to 'lib/Reply/Plugin/ResultCache.pm')
-rw-r--r--lib/Reply/Plugin/ResultCache.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Reply/Plugin/ResultCache.pm b/lib/Reply/Plugin/ResultCache.pm
index a973d05..91fda37 100644
--- a/lib/Reply/Plugin/ResultCache.pm
+++ b/lib/Reply/Plugin/ResultCache.pm
@@ -36,8 +36,9 @@ sub compile {
my $self = shift;
my ($next, $line, %args) = @_;
- $args{environment} ||= {};
- $args{environment}{'@' . $self->{result_name}} = $self->{results};
+ $args{environments}{''.__PACKAGE__} = {
+ "\@$self->{result_name}" => $self->{results},
+ };
$next->($line, %args);
}