Devel/IPerl/ReadLine/Role/DevelREPL.pm untested

filter: Statementstmt 0.0% 0 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 33 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Devel::IPerl::ReadLine::Role::DevelREPL;
2 $Devel::IPerl::ReadLine::Role::DevelREPL::VERSION = '0.012';
3 use strict;
4 use warnings;
5  
6 use Moo::Role;
7  
8 has last_output => ( is => 'rw' );
9  
10 has error => ( is => 'rw' );
11  
12 has results => ( is => 'rw', default => sub { [] } );
13  
14 before run_once => sub {
15 my $self = shift;
16 $self->last_output(undef);
17 $self->error(undef);
18 };
19  
20 before format_result => sub {
21 my ($self, @stuff) = @_;
22 $self->results( \@stuff );
23 };
24  
25 before format_error => sub {
26 my ($self, $error) = @_;
27 $self->error( $error );
28 };
29  
30 after run_once => sub {
31 my $self = shift;
32 $self->last_output(${$self->term->string});
33 $self->term->clear_output;
34 };
35  
36 1;
37  
38 __END__