blob: 90e8627e7d2a91ef629b305c8458a5f269cdf445 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package App::REPL::Plugin::FancyPrompt;
use strict;
use warnings;
use base 'App::REPL::Plugin';
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
$self->{counter} = 0;
return $self;
}
sub prompt {
my $self = shift;
my ($next) = @_;
return $self->{counter}++ . $next->();
}
1;
|