diff options
Diffstat (limited to 'lib/App/REPL/Plugin/Colors.pm')
-rw-r--r-- | lib/App/REPL/Plugin/Colors.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/App/REPL/Plugin/Colors.pm b/lib/App/REPL/Plugin/Colors.pm index b06f857..dc00cfd 100644 --- a/lib/App/REPL/Plugin/Colors.pm +++ b/lib/App/REPL/Plugin/Colors.pm @@ -17,7 +17,15 @@ sub new { return $self; } -sub evaluate { +sub compile { + my $self = shift; + my ($next, @args) = @_; + + local $SIG{__WARN__} = sub { $self->print_warn(@_) }; + $next->(@args); +} + +sub execute { my $self = shift; my ($next, @args) = @_; |