| 1 | package Reply::Plugin::FancyPrompt; | ||||||||||
| 2 | 1 | our $AUTHORITY = 'cpan:DOY'; | |||||||||
| 3 | 1 | $Reply::Plugin::FancyPrompt::VERSION = '0.42'; | |||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | # ABSTRACT: provides a more informative prompt | ||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use base 'Reply::Plugin'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 12 | 0 | my $class = shift; | |||||||||
| 13 | 0 | my $self = $class->SUPER::new(@_); | |||||||||
| 14 | 0 | $self->{counter} = 0; | |||||||||
| 15 | 0 | $self->{prompted} = 0; | |||||||||
| 16 | 0 | return $self; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub prompt { | ||||||||
|
Subroutine
prompt: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 20 | 0 | my $self = shift; | |||||||||
| 21 | 0 | my ($next) = @_; | |||||||||
| 22 | 0 | $self->{prompted} = 1; | |||||||||
| 23 | 0 | return $self->{counter} . $next->(); | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub loop { | ||||||||
|
Subroutine
loop: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 27 | 0 | my $self = shift; | |||||||||
| 28 | 0 | my ($continue) = @_; | |||||||||
| 29 | 0 | ▶ | $self->{counter}++ if $self->{prompted}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | $self->{prompted} = 0; | |||||||||
| 31 | 0 | $continue; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 1 | 1; | |||||||||
| 35 | |||||||||||
| 36 | __END__ | ||||||||||