aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-13 03:07:31 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-13 03:07:31 +0000
commit506bcbac0420a46997ad531961d543e62c011513 (patch)
tree8eaa71367c58158924077e61a3f6b2d1383cbb96 /IkiWiki.pm
parentb2101850e2098684a864e6143725247606da96bb (diff)
downloadikiwiki-506bcbac0420a46997ad531961d543e62c011513.tar
ikiwiki-506bcbac0420a46997ad531961d543e62c011513.tar.gz
* Fix --libdir to work at the command line.
* Plugins can now be written as standalone external programs, which can be written in any language that can do XML::RPC.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index d5a641526..7c35ce2b5 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -160,11 +160,20 @@ sub loadplugin ($) { #{{{
return if grep { $_ eq $plugin} @{$config{disable_plugins}};
+ foreach my $dir ($config{libdir}, "$installdir/lib/ikiwiki") {
+ if (defined $dir && -x "$dir/plugins/$plugin") {
+ require IkiWiki::Plugin::external;
+ import IkiWiki::Plugin::external "$dir/plugins/$plugin";
+ return 1;
+ }
+ }
+
my $mod="IkiWiki::Plugin::".possibly_foolish_untaint($plugin);
eval qq{use $mod};
if ($@) {
error("Failed to load plugin $mod: $@");
}
+ return 1;
} #}}}
sub error ($;$) { #{{{