summaryrefslogtreecommitdiff
path: root/bin/locmaint
diff options
context:
space:
mode:
Diffstat (limited to 'bin/locmaint')
-rwxr-xr-xbin/locmaint6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/locmaint b/bin/locmaint
index ee05ea2c..a1dcb1a6 100755
--- a/bin/locmaint
+++ b/bin/locmaint
@@ -279,7 +279,8 @@ sub do_homedir {
sub do_coldbkup {
my $root = shift;
- return unless eval "use Git::Wrapper; use Net::GitHub; 1";
+ return
+ unless eval { require Git::Wrapper } and eval { require Net::GitHub };
my $short = basename($root);
my $gitbk = catfile($root, "gitbk");
@@ -380,7 +381,8 @@ sub do_coldbkup {
}
sub do_workstation_duplicity {
- return unless eval "use Date::Manip; 1";
+ return unless eval { require Date::Manip };
+ Date::Manip->import;
my $profile = hostname() . "-" . getpwuid($<) . "-home";
return unless -e "$ENV{HOME}/.duply/$profile/conf";