From: Martin Mares Date: Mon, 8 Nov 2021 12:48:10 +0000 (+0100) Subject: gal-mj-init: Use "do" instead of "require" X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=98d193e9309108ff6c29657021a9a84cc507eba1;p=gallery.git gal-mj-init: Use "do" instead of "require" Otherwise Perl's caching of modules can bite us (if default.cf is already loaded, require returns 1 instead of the proper return value). --- diff --git a/bin/gal-mj-init b/bin/gal-mj-init index adceebe..84a7600 100755 --- a/bin/gal-mj-init +++ b/bin/gal-mj-init @@ -11,7 +11,7 @@ fi cat >gallery.cf <<'AMEN' use common::sense; -my $gal = require '../../default.cf'; +my $gal = do '../../default.cf'; $gal->set( Title => 'Unnamed', );