diff options
author | Jesse Luehrs <doy@tozt.net> | 2016-08-16 03:37:03 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2016-08-16 03:38:22 -0400 |
commit | 96ed58c6de66c8495cb3982373fb82ab19508536 (patch) | |
tree | add499f80e7be10bc7f9aaf2972be637cd1dc516 /lib/Reply/Plugin/Defaults.pm | |
parent | 488afdc2363b34fc1858826f3a0fa54fdb04f9bf (diff) | |
download | reply-96ed58c6de66c8495cb3982373fb82ab19508536.tar.gz reply-96ed58c6de66c8495cb3982373fb82ab19508536.zip |
add #vars command to list currently in scope variable names (#39)
Diffstat (limited to 'lib/Reply/Plugin/Defaults.pm')
-rw-r--r-- | lib/Reply/Plugin/Defaults.pm | 8 |
1 files changed, 8 insertions, 0 deletions
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 |