summary refs log tree commit diff
path: root/lib/Net/HTTP/Console/Role/Prompt.pm
blob: b6a95992e0d561f752bcb9587c48597b4dffb4cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package Net::HTTP::Console::Role::Prompt;

use MooseX::Declare;

role Net::HTTP::Console::Role::Prompt {

    has prompt => (
        isa     => 'Str',
        is      => 'rw',
        lazy    => 1,
        default => sub {
            my $self = shift;
            my $url  = $self->api_object->api_base_url;
            return ($url || '[no url defined!]') . '> ';
        }
    );

}

1;