quick test, update deps, add DDS plugin
matthewt [Mon, 18 Jun 2007 17:06:36 +0000 (17:06 +0000)]
git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@3510 bd8105ee-0ff8-0310-8827-fb3f25b6796d

Makefile.PL
lib/Devel/REPL.pm
lib/Devel/REPL/Plugin/DDS.pm [new file with mode: 0644]
script/re.pl
t/load_core.t [new file with mode: 0644]

index 51f2495..c1f1666 100644 (file)
@@ -7,12 +7,16 @@ all_from 'lib/Devel/REPL.pm';
 
 install_script 'script/re.pl';
 
+build_requires 'Test::More';
 requires 'Moose';
 requires 'MooseX::Object::Pluggable';
+requires 'MooseX::Getopt';
 requires 'namespace::clean';
 requires 'File::HomeDir';
 requires 'File::Spec';
 requires 'Term::ReadLine';
+requires 'Lexical::Persistence';
+requires 'Data::Dump::Streamer';
 
 auto_install;
 WriteAll;
index 07f3828..3752fd4 100644 (file)
@@ -5,7 +5,7 @@ use Moose;
 use namespace::clean -except => [ 'meta' ];
 use 5.8.1; # might work with earlier perls but probably not
 
-our $VERSION = '1.000000';
+our $VERSION = '1.001000'; # 1.1.0
 
 with 'MooseX::Object::Pluggable';
 
@@ -101,6 +101,8 @@ Devel::REPL - a modern perl interactive shell
 
 Alternatively, use the 're.pl' script installed with the distribution
 
+  system$ re.pl
+
 =head1 AUTHOR
 
 Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>)
diff --git a/lib/Devel/REPL/Plugin/DDS.pm b/lib/Devel/REPL/Plugin/DDS.pm
new file mode 100644 (file)
index 0000000..512d48c
--- /dev/null
@@ -0,0 +1,22 @@
+package Devel::REPL::Plugin::DDS;
+
+use Moose::Role;
+use Data::Dump::Streamer ();
+
+around 'print' => sub {
+  my $orig = shift;
+  my $self = shift;
+  my $to_dump = (@_ > 1) ? [@_] : $_[0];
+  my $out;
+  if (ref $to_dump) {
+    my $dds = Data::Dump::Streamer->new;
+    $dds->Freezer(sub { "$_[0]"; });
+    $dds->Data($to_dump);
+    $out = $dds->Out;
+  } else {
+    $out = $to_dump;
+  }
+  $self->$orig($out);
+};
+
+1;
index 3b8f6e4..fd2c3df 100755 (executable)
@@ -1,10 +1,3 @@
 #!/usr/bin/env perl
 
-use lib 'lib';
 use Devel::REPL::Script 'run';
-
-#my $repl = Devel::REPL->new;
-
-#$repl->load_plugin('History');
-#$repl->load_plugin('LexEnv');
-#$repl->run;
diff --git a/t/load_core.t b/t/load_core.t
new file mode 100644 (file)
index 0000000..c21dc21
--- /dev/null
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More 'no_plan';
+
+use_ok('Devel::REPL');
+use_ok('Devel::REPL::Script');
+use_ok('Devel::REPL::Plugin::History');
+use_ok('Devel::REPL::Plugin::LexEnv');
+use_ok('Devel::REPL::Plugin::DDS');