]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/external_plugins_cannot_access_ARGV_needed_for_getopt.mdwn
trying to figure out how to make ikiwiki slightly more interactive
[ikiwiki.git] / doc / bugs / external_plugins_cannot_access_ARGV_needed_for_getopt.mdwn
1 The `getopt` hook expects plugins to modify `@ARGV`. This is not exported via xml-rpc and thus external plugins cannot do anything. --[[madduck]]
2
3 > I can think of two interfaces to handle this.
4
5 > 1. Pass @ARGV to the hook, and remove any values the hook returns from @ARGV.
6 > 2. Provide an XML-RPC interface for setting and getting ikiwiki's @ARGV.
7
8 > The first is simpler, but requires keeping track of which options to
9 > remove, which could be a pain, and probably precludes using regular
10 > getopt libraries to process options. It also could theoretically cause
11 > problems for existing perl getopt hooks.
12
13 > The second should allow using regular getopt libraries, but does bloat
14 > the RPC interface. Oh well, guess that's ok. [[done]] --[[Joey]]