diff options
author | Florian Pritz <bluewind@xinu.at> | 2019-09-28 14:55:44 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2019-09-28 15:25:57 +0200 |
commit | de053014116837eba145350cb0aa97524d745d1f (patch) | |
tree | 5739af26b87855c69102aed3d4c802640c728aa9 /lib/App/BorgRestore/Settings.pm | |
parent | 6d92a2b4a449674f515cd7391c95e2c94e25cfba (diff) | |
download | App-BorgRestore-de053014116837eba145350cb0aa97524d745d1f.tar.gz App-BorgRestore-de053014116837eba145350cb0aa97524d745d1f.tar.xz |
Import untaint function where used
Better code readability than with the full name.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/BorgRestore/Settings.pm')
-rw-r--r-- | lib/App/BorgRestore/Settings.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/App/BorgRestore/Settings.pm b/lib/App/BorgRestore/Settings.pm index bc4fbd0..a1d6bfd 100644 --- a/lib/App/BorgRestore/Settings.pm +++ b/lib/App/BorgRestore/Settings.pm @@ -2,7 +2,7 @@ package App::BorgRestore::Settings; use v5.14; use strictures 2; -use App::BorgRestore::Helper; +use App::BorgRestore::Helper qw(untaint); use autodie; use Function::Parameters; @@ -158,7 +158,7 @@ method new_no_defaults($class: $deps = {}) { ."the path in the config file or ensure that the variables are set."; } - $cache_path_base = App::BorgRestore::Helper::untaint($cache_path_base, qr/.*/); + $cache_path_base = untaint($cache_path_base, qr/.*/); return $self; } @@ -188,7 +188,7 @@ fun load_config_files() { push @configfiles, "/etc/borg-restore.cfg"; for my $configfile (@configfiles) { - $configfile = App::BorgRestore::Helper::untaint($configfile, qr/.*/); + $configfile = untaint($configfile, qr/.*/); if (-e $configfile) { unless (my $return = do $configfile) { die "couldn't parse $configfile: $@" if $@; |