From: Carl Worth Date: Fri, 15 Jun 2007 17:18:12 +0000 (-0700) Subject: Add a BEGIN block so that the gitrepo and checkout variables actually work X-Git-Url: https://git.cworth.org/git?p=ikiwiki-bootstrap;a=commitdiff_plain;h=edb8489396cd121863350e429eb2679d7bef3c9d 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. --- 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 {