Commit | Line | Data |
---|---|---|
f254750a | 1 | # Adds a newline after print. Some readlines need it some don't. I guess |
2 | # we should clarify whether this is a bug and if so whose bug at some point | |
3 | # but this'll do for now ;) | |
4 | ||
5 | package Devel::REPL::Plugin::NewlineHack; | |
6 | ||
7 | use Moose::Role; | |
48ddfeae | 8 | use namespace::clean -except => [ 'meta' ]; |
f254750a | 9 | |
10 | after 'print' => sub { | |
11 | # not fussed about args | |
12 | my ($self) = @_; | |
13 | my $fh = $self->out_fh; | |
14 | print $fh "\n"; | |
15 | }; | |
16 | ||
17 | 1; | |
18 |