From 20907d84f16d74874a61c61cb8698c79e96f04ff Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 6 Jul 2011 10:09:34 +0200 Subject: Raps2.pm: new: Add no_cli option, removes Test::MockObject build dependency --- lib/App/Raps2.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') 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 of key setup, passed on to App::Raps2::Password(3pm). +=item B => I + +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>] ) -- cgit v1.2.3