diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-06-08 15:22:36 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-06-08 15:22:36 +0200 |
| commit | 78fcbf54a4305e1ee6c3a105f91af40c7ea0a62a (patch) | |
| tree | c4eb6cec29a92076c2f6fc47ca318cbe59f5e0ba /lib/Net/HTTP/Console/Role/Prompt.pm | |
| parent | update regex; modify http methods; .. (diff) | |
| download | net-http-console-78fcbf54a4305e1ee6c3a105f91af40c7ea0a62a.tar.gz | |
switch to MX::Declare; rename some roles and dispatcher
Diffstat (limited to '')
| -rw-r--r-- | lib/Net/HTTP/Console/Role/Prompt.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Net/HTTP/Console/Role/Prompt.pm b/lib/Net/HTTP/Console/Role/Prompt.pm new file mode 100644 index 0000000..b6a9599 --- /dev/null +++ b/lib/Net/HTTP/Console/Role/Prompt.pm @@ -0,0 +1,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; |
