X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FColors.pm;h=bdc5e9444be6731a691cd3d2049412fb355a78f1;hp=17592b84f56d973135e9ad29ac572ed8f825c63b;hb=e2d0b0198529e2e06593df8ebab7a8413bc932e1;hpb=e22aa835df762f888ec7ff9efb2a599ebe17538e diff --git a/lib/Devel/REPL/Plugin/Colors.pm b/lib/Devel/REPL/Plugin/Colors.pm index 17592b8..bdc5e94 100644 --- a/lib/Devel/REPL/Plugin/Colors.pm +++ b/lib/Devel/REPL/Plugin/Colors.pm @@ -1,17 +1,17 @@ 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 { @@ -26,6 +26,7 @@ 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, @_),