summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-07-06 10:09:34 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-07-06 10:09:34 +0200
commit20907d84f16d74874a61c61cb8698c79e96f04ff (patch)
tree6963ecdcaa6d9cd239a97a408e340712ea225305 /lib
parent2d2355dfd840a100a50b3d349be5d9c88d6de2f8 (diff)
Raps2.pm: new: Add no_cli option, removes Test::MockObject build dependency
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>] )