[Bast-commits] r3510 - in trunk/Devel-REPL: . lib/Devel
lib/Devel/REPL/Plugin script t
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Mon Jun 18 18:06:40 GMT 2007
Author: matthewt
Date: 2007-06-18 18:06:36 +0100 (Mon, 18 Jun 2007)
New Revision: 3510
Added:
trunk/Devel-REPL/lib/Devel/REPL/Plugin/DDS.pm
trunk/Devel-REPL/t/
trunk/Devel-REPL/t/load_core.t
Modified:
trunk/Devel-REPL/Makefile.PL
trunk/Devel-REPL/lib/Devel/REPL.pm
trunk/Devel-REPL/script/re.pl
Log:
quick test, update deps, add DDS plugin
Modified: trunk/Devel-REPL/Makefile.PL
===================================================================
--- trunk/Devel-REPL/Makefile.PL 2007-06-17 21:13:23 UTC (rev 3509)
+++ trunk/Devel-REPL/Makefile.PL 2007-06-18 17:06:36 UTC (rev 3510)
@@ -7,12 +7,16 @@
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;
Added: trunk/Devel-REPL/lib/Devel/REPL/Plugin/DDS.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/DDS.pm (rev 0)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/DDS.pm 2007-06-18 17:06:36 UTC (rev 3510)
@@ -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;
Modified: trunk/Devel-REPL/lib/Devel/REPL.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL.pm 2007-06-17 21:13:23 UTC (rev 3509)
+++ trunk/Devel-REPL/lib/Devel/REPL.pm 2007-06-18 17:06:36 UTC (rev 3510)
@@ -5,7 +5,7 @@
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 @@
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/>)
Modified: trunk/Devel-REPL/script/re.pl
===================================================================
--- trunk/Devel-REPL/script/re.pl 2007-06-17 21:13:23 UTC (rev 3509)
+++ trunk/Devel-REPL/script/re.pl 2007-06-18 17:06:36 UTC (rev 3510)
@@ -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;
Added: trunk/Devel-REPL/t/load_core.t
===================================================================
--- trunk/Devel-REPL/t/load_core.t (rev 0)
+++ trunk/Devel-REPL/t/load_core.t 2007-06-18 17:06:36 UTC (rev 3510)
@@ -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');
More information about the Bast-commits
mailing list