From 6eb3cf7e76c53b05154bb2104e395922bd0eed4e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Mar 2008 15:49:00 -0400 Subject: make setargv take an array for consistentcy with getargv, which returns one --- IkiWiki/Plugin/external.pm | 3 ++- doc/plugins/write/external.mdwn | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/external.pm b/IkiWiki/Plugin/external.pm index a30ef3f61..43d2cbb28 100644 --- a/IkiWiki/Plugin/external.pm +++ b/IkiWiki/Plugin/external.pm @@ -162,8 +162,9 @@ sub getargv ($) { #{{{ sub setargv ($@) { #{{{ my $plugin=shift; + my $array=shift; - @ARGV=@_; + @ARGV=@$array; } #}}} sub inject ($@) { #{{{ diff --git a/doc/plugins/write/external.mdwn b/doc/plugins/write/external.mdwn index 058b9e58a..4492cd0da 100644 --- a/doc/plugins/write/external.mdwn +++ b/doc/plugins/write/external.mdwn @@ -54,7 +54,7 @@ stored state, call `getstate("page", "id", "key")`, and to store state, call `setstate("page", "id", "key", "value")`. To access ikiwiki's ARGV array, call `getargv()`. To change its ARGV, call -`setargv(value)`. +`setargv(array)`. ## Notes on function parameters -- cgit v1.2.3