summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--lib/Reply/Plugin/Defaults.pm8
2 files changed, 9 insertions, 0 deletions
diff --git a/Changes b/Changes
index 45fba1b..96cbc8a 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Revision history for Reply
{{$NEXT}}
+ - add #vars command to list currently in scope variable names (garu, #39)
0.40 2016-06-25
- fix docs (y, #49)
diff --git a/lib/Reply/Plugin/Defaults.pm b/lib/Reply/Plugin/Defaults.pm
index bbe5934..886e75f 100644
--- a/lib/Reply/Plugin/Defaults.pm
+++ b/lib/Reply/Plugin/Defaults.pm
@@ -92,6 +92,13 @@ sub command_q {
return '';
}
+sub command_vars {
+ my $self = shift;
+
+ my %env = map { %$_ } $self->publish('lexical_environment');
+ return '(' . join(', ', map { qq<'$_'> } keys %env) . ')';
+}
+
sub loop {
my $self = shift;
my ($continue) = @_;
@@ -105,6 +112,7 @@ sub loop {
new
command_q
+ command_vars
=end Pod::Coverage