diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-06-08 20:10:23 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-06-08 20:10:23 +0200 |
commit | f303e11a43325cecbd03a1a465903a3e2452e432 (patch) | |
tree | 10bb66c3490dfc9ed6a9b66e30b7ed41b8addb4b /lib | |
parent | 88010542443bf1f83906a0bbf7e3003d045471f6 (diff) |
App/Raps2: Run sanity_check and load_config in new
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/Raps2.pm | 12 |
1 files changed, 10 insertions, 2 deletions
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<new>. Calls B<create_config> 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<new>. =item $raps2->pw() |