[Bps-public-commit] r9001 - in Carp-REPL: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Sep 11 20:12:30 EDT 2007


Author: sartak
Date: Tue Sep 11 20:12:28 2007
New Revision: 9001

Modified:
   Carp-REPL/   (props changed)
   Carp-REPL/Makefile.PL
   Carp-REPL/lib/Devel/REPL/Plugin/LexEnvCarp.pm

Log:
 r42556 at onn:  sartak | 2007-09-11 20:03:55 -0400
 Add :e command for dumping the current lexical environment


Modified: Carp-REPL/Makefile.PL
==============================================================================
--- Carp-REPL/Makefile.PL	(original)
+++ Carp-REPL/Makefile.PL	Tue Sep 11 20:12:28 2007
@@ -6,15 +6,16 @@
 all_from        'lib/Carp/REPL.pm';
 
 # Specific dependencies
-requires        'Devel::LexAlias'  => 0;
-requires        'Devel::REPL'      => 0;
-requires        'Moose'            => 0;
-requires        'Moose::Role'      => 0;
-requires        'namespace::clean' => 0;
-requires        'PadWalker'        => 0;
+requires        'Devel::LexAlias'      => 0;
+requires        'Devel::REPL'          => 0;
+requires        'Moose'                => 0;
+requires        'Moose::Role'          => 0;
+requires        'namespace::clean'     => 0;
+requires        'PadWalker'            => 0;
+requires        'Data::Dump::Streamer' => 0;
 
-build_requires  'Test::Expect'     => 0;
-build_requires  'Test::More'       => 0;
+build_requires  'Test::Expect'         => 0;
+build_requires  'Test::More'           => 0;
 
 no_index package => 'DB';
 

Modified: Carp-REPL/lib/Devel/REPL/Plugin/LexEnvCarp.pm
==============================================================================
--- Carp-REPL/lib/Devel/REPL/Plugin/LexEnvCarp.pm	(original)
+++ Carp-REPL/lib/Devel/REPL/Plugin/LexEnvCarp.pm	Tue Sep 11 20:12:28 2007
@@ -3,6 +3,7 @@
 use Moose::Role;
 use namespace::clean -except => [ 'meta' ];
 use Devel::LexAlias;
+use Data::Dump::Streamer;
 
 has 'environments' => (
     isa => 'ArrayRef',
@@ -78,6 +79,12 @@
     return '';
   }
 
+  if ($line =~ /^\s*:e?(?:nv)?\s*$/)
+  {
+    Dump($self->environments->[$self->frame])->Names('Env')->Out;
+    return '';
+  }
+
   if ($line =~ /^\s*:up?\s*$/)
   {
     $self->frame($self->frame + 1);



More information about the Bps-public-commit mailing list