From de053014116837eba145350cb0aa97524d745d1f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 28 Sep 2019 14:55:44 +0200 Subject: Import untaint function where used Better code readability than with the full name. Signed-off-by: Florian Pritz --- lib/App/BorgRestore/Settings.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/App/BorgRestore/Settings.pm') 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 $@; -- cgit v1.2.3-24-g4f1b