From: epitaph Date: Sun, 22 Apr 2007 13:46:23 +0000 (+0000) Subject: Added Plugin/NewlineHack, simple plugin to print a newline after output X-Git-Tag: v1.003015~172 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f254750a4425f47eca1923f7e44b3b53b3c71104;p=p5sagit%2FDevel-REPL.git Added Plugin/NewlineHack, simple plugin to print a newline after output git-svn-id: http://dev.catalyst.perl.org/repos/bast/trunk/Devel-REPL@3204 bd8105ee-0ff8-0310-8827-fb3f25b6796d --- diff --git a/lib/Devel/REPL/Plugin/NewlineHack.pm b/lib/Devel/REPL/Plugin/NewlineHack.pm new file mode 100644 index 0000000..96a464f --- /dev/null +++ b/lib/Devel/REPL/Plugin/NewlineHack.pm @@ -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; +