]> mj.ucw.cz Git - gallery.git/commitdiff
gal-mj-init: Use "do" instead of "require"
authorMartin Mares <mj@ucw.cz>
Mon, 8 Nov 2021 12:48:10 +0000 (13:48 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 8 Nov 2021 12:48:10 +0000 (13:48 +0100)
Otherwise Perl's caching of modules can bite us (if default.cf is
already loaded, require returns 1 instead of the proper return value).

bin/gal-mj-init

index adceebe6e18678a0827679d35bd19b239023f75f..84a760038dfa5131f741c6be6b9e0f37c407072a 100755 (executable)
@@ -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',
 );