summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/FancyPrompt.pm
blob: aec5b825d60257f0240181d0e337523f66a6f7ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package Reply::Plugin::FancyPrompt;
use strict;
use warnings;

use base 'Reply::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;