diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-09-09 10:48:44 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-09-09 15:45:11 +0200 |
commit | da0048ce63d3f9ffeddda765652acce635d71834 (patch) | |
tree | 53e7f8fb4d91506b642a0aa6d79a78b37aff4eac /lib | |
parent | d0c1ef65d64874c1ad9d9099eaf1c20f389f6441 (diff) | |
download | App-BorgRestore-da0048ce63d3f9ffeddda765652acce635d71834.tar.gz App-BorgRestore-da0048ce63d3f9ffeddda765652acce635d71834.tar.xz |
Settings: Use Function::Parameters
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/BorgRestore/Settings.pm | 11 |
1 files changed, 5 insertions, 6 deletions
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'); } |