aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/external_plugins_cannot_access_ARGV_needed_for_getopt.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bugs/external_plugins_cannot_access_ARGV_needed_for_getopt.mdwn')
-rw-r--r--doc/bugs/external_plugins_cannot_access_ARGV_needed_for_getopt.mdwn14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/bugs/external_plugins_cannot_access_ARGV_needed_for_getopt.mdwn b/doc/bugs/external_plugins_cannot_access_ARGV_needed_for_getopt.mdwn
new file mode 100644
index 000000000..be7f16a79
--- /dev/null
+++ b/doc/bugs/external_plugins_cannot_access_ARGV_needed_for_getopt.mdwn
@@ -0,0 +1,14 @@
+The `getopt` hook expects plugins to modify `@ARGV`. This is not exported via xml-rpc and thus external plugins cannot do anything. --[[madduck]]
+
+> I can think of two interfaces to handle this.
+>
+> 1. Pass @ARGV to the hook, and remove any values the hook returns from @ARGV.
+> 2. Provide an XML-RPC interface for setting and getting ikiwiki's @ARGV.
+>
+> The first is simpler, but requires keeping track of which options to
+> remove, which could be a pain, and probably precludes using regular
+> getopt libraries to process options. It also could theoretically cause
+> problems for existing perl getopt hooks.
+>
+> The second should allow using regular getopt libraries, but does bloat
+> the RPC interface. Oh well, guess that's ok. [[done]] --[[Joey]]