[Bps-public-commit] Carp-REPL branch, master, updated. cf2a6c637dfe83ee9862593734cafb0ff7544dff

sartak at bestpractical.com sartak at bestpractical.com
Wed Jul 8 15:03:26 EDT 2009


The branch, master has been updated
       via  cf2a6c637dfe83ee9862593734cafb0ff7544dff (commit)
      from  9a2b0e98d2b4a4cd2511afa6e1f2e561b8b9e766 (commit)

Summary of changes:
 lib/Devel/REPL/Plugin/Carp/REPL.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit cf2a6c637dfe83ee9862593734cafb0ff7544dff
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed Jul 8 15:03:17 2009 -0400

    Clarity tweaks

diff --git a/lib/Devel/REPL/Plugin/Carp/REPL.pm b/lib/Devel/REPL/Plugin/Carp/REPL.pm
index a4461bd..f1dfdd4 100644
--- a/lib/Devel/REPL/Plugin/Carp/REPL.pm
+++ b/lib/Devel/REPL/Plugin/Carp/REPL.pm
@@ -138,6 +138,7 @@ around 'read' => sub {
     return $line;
 };
 
+# Provide an alias for each lexical in the current stack frame
 around 'mangle_line' => sub {
     my $orig = shift;
     my ($self, @rest) = @_;
@@ -145,10 +146,11 @@ around 'mangle_line' => sub {
 
     my $frame = $self->frame;
     my $package = $frame->package;
+    my $lexicals = $frame->lexicals;
 
     my $declarations = join "\n",
                        map {"my $_;"}
-                       keys %{ $frame->lexicals };
+                       keys %$lexicals;
 
     my $aliases = << '    ALIASES';
     while (my ($k, $v) = each %{ $_REPL->frame->lexicals }) {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list