From da0048ce63d3f9ffeddda765652acce635d71834 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 9 Sep 2018 10:48:44 +0200 Subject: Settings: Use Function::Parameters Signed-off-by: Florian Pritz --- lib/App/BorgRestore/Settings.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/App/BorgRestore/Settings.pm b/lib/App/BorgRestore/Settings.pm index 0f3803a..8cbbf9c 100644 --- a/lib/App/BorgRestore/Settings.pm +++ b/lib/App/BorgRestore/Settings.pm @@ -6,6 +6,7 @@ use warnings; use App::BorgRestore::Helper; use autodie; +use Function::Parameters; use Sys::Hostname; =encoding utf-8 @@ -154,21 +155,19 @@ if (not defined $cache_path_base) { $cache_path_base = App::BorgRestore::Helper::untaint($cache_path_base, qr/.*/); -sub get_cache_base_dir_path { - my $path = shift; +fun get_cache_base_dir_path($path) { return "$cache_path_base/$path"; } -sub get_cache_dir { +fun get_cache_dir() { return "$cache_path_base/v3"; } -sub get_cache_path { - my $item = shift; +fun get_cache_path($item) { return get_cache_dir()."/$item"; } -sub get_db_path { +fun get_db_path() { return get_cache_path('archives.db'); } -- cgit v1.2.3-24-g4f1b