From edb8489396cd121863350e429eb2679d7bef3c9d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 15 Jun 2007 10:18:12 -0700 Subject: [PATCH] Add a BEGIN block so that the gitrepo and checkout variables actually work The trick here is that the hash containing configuration settings is being passed to a perl module's import method with a use statement. That use statement includes an implicit BEGIN statement which makes the import function get called at compile-time. So our settings for gitrepo and checkout don't take effect unless we also put them in their own BEGIN block. --- ikiwiki.setup | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ikiwiki.setup b/ikiwiki.setup index 180bb8e..2e41717 100644 --- a/ikiwiki.setup +++ b/ikiwiki.setup @@ -27,8 +27,12 @@ # Also, see the destdir and url parameters below which must also be # configured before things will work at all. -my gitrepo = '/path/to/bare/git/repo'; -my checkout = "$gitrepo/ikiwiki-checkout"; +our ($gitrepo, $checkout); + +BEGIN { + $gitrepo = '/path/to/bare/git/repo'; + $checkout = "$gitrepo/ikiwiki-checkout"; +} use IkiWiki::Setup::Standard { -- 2.43.0