[Bast-commits] r3204 - trunk/Devel-REPL/lib/Devel/REPL/Plugin

epitaph at dev.catalyst.perl.org epitaph at dev.catalyst.perl.org
Sun Apr 22 14:46:24 GMT 2007


Author: epitaph
Date: 2007-04-22 14:46:23 +0100 (Sun, 22 Apr 2007)
New Revision: 3204

Added:
   trunk/Devel-REPL/lib/Devel/REPL/Plugin/NewlineHack.pm
Log:
Added Plugin/NewlineHack, simple plugin to print a newline after output


Added: trunk/Devel-REPL/lib/Devel/REPL/Plugin/NewlineHack.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/NewlineHack.pm	                        (rev 0)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/NewlineHack.pm	2007-04-22 13:46:23 UTC (rev 3204)
@@ -0,0 +1,19 @@
+# Adds a newline after print. Some readlines need it some don't. I guess
+# we should clarify whether this is a bug and if so whose bug at some point
+# but this'll do for now ;)
+
+package Devel::REPL::Plugin::NewlineHack;
+
+use Moose::Role;
+
+use Data::Dumper;
+
+after 'print' => sub {
+  # not fussed about args
+  my ($self) = @_;
+  my $fh = $self->out_fh;
+  print $fh "\n";
+};
+
+1;
+




More information about the Bast-commits mailing list