summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/App/Raps2.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/App/Raps2.pm b/lib/App/Raps2.pm
index d515548..891dc9c 100644
--- a/lib/App/Raps2.pm
+++ b/lib/App/Raps2.pm
@@ -20,7 +20,9 @@ sub new {
$self->{xdg_conf} = config_home('raps2');
$self->{xdg_data} = data_home('raps2');
- $self->{ui} = App::Raps2::UI->new();
+ if ( not $opt{no_cli} ) {
+ $self->{ui} = App::Raps2::UI->new();
+ }
$self->{default} = \%opt;
@@ -237,6 +239,12 @@ Accepted configuration parameters are:
B<cost> of key setup, passed on to App::Raps2::Password(3pm).
+=item B<no_cli> => I<bool>
+
+If set to true, App::Raps2 assumes it will not be used as a CLI. It won't
+initialize its Term::ReadLine object and won't try to read anything from the
+terminal.
+
=back
=item $raps2->get_master_password( [I<$password>] )