From f303e11a43325cecbd03a1a465903a3e2452e432 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 8 Jun 2011 20:10:23 +0200 Subject: App/Raps2: Run sanity_check and load_config in new --- lib/App/Raps2.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/App/Raps2.pm') diff --git a/lib/App/Raps2.pm b/lib/App/Raps2.pm index 7de4b1a..6b40cc2 100644 --- a/lib/App/Raps2.pm +++ b/lib/App/Raps2.pm @@ -24,7 +24,14 @@ sub new { $ref->{default} = \%conf; - return bless( $ref, $obj ); + bless( $ref, $obj ); + + if ( not $conf{dont_touch_fs} ) { + $ref->sanity_check(); + $ref->load_config(); + } + + return $ref; } sub file_to_hash { @@ -383,6 +390,7 @@ with its key/value pairs. Create working directories (~/.config/raps2 and ~/.local/share/raps2, or the respective XDG environment variable contents), if they don't exist yet. +Automatically called by B. Calls B if no raps2 config was found. @@ -396,7 +404,7 @@ Creates a default config and asks the user to set a master password. =item $raps2->load_config() -Load config +Load config. Automatically called by B. =item $raps2->pw() -- cgit v1.2.3