package Devel::REPL::Plugin::Colors;
-use Moose::Role;
+use Devel::REPL::Plugin;
use Term::ANSIColor;
-use namespace::clean -except => [ 'meta' ];
+use namespace::sweep;
has normal_color => (
is => 'rw', lazy => 1,
- default => 'green',
+ default => sub { 'green' },
);
has error_color => (
is => 'rw', lazy => 1,
- default => 'bold red',
+ default => sub { 'bold red' },
);
around format_error => sub {
around format_result => sub {
my $orig = shift;
my $self = shift;
+ no warnings 'uninitialized';
return join "", (
color($self->normal_color),
$orig->($self, @_),