X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2423808fdfdd987068f929e11c880525041c3d1c..3a04e96389def78bcb873a4487b85f4d75653199:/doc/todo/support_multiple_perl_libraries.mdwn?ds=sidebyside diff --git a/doc/todo/support_multiple_perl_libraries.mdwn b/doc/todo/support_multiple_perl_libraries.mdwn index b71780f98..579e35749 100644 --- a/doc/todo/support_multiple_perl_libraries.mdwn +++ b/doc/todo/support_multiple_perl_libraries.mdwn @@ -18,5 +18,39 @@ I think the change is a one-liner, but I put this here for discussion before att > > [[Louis|spalax]] +>> Modifying `getconfig` is not a valid solution, because IkiWiki.pm is also imported by +>> [[ikiwiki-transition]], [[ikiwiki-calendar]], the regression tests, etc. +>> +>> The way I would personally do it is to have a new non-exported function `getlibdirs` +>> or something, have it do something like this: +>> +>> if (! ref $config{libdir}) { +>> if (length $config{libdir}) { +>> $config{libdir} = [$config{libdir}]; +>> } else { +>> $config{libdir} = []; +>> } +>> } +>> return @{$config{libdir}}; +>> +>> and replace all uses of $config{libdir} with it. +>> +>> --[[smcv]] +>>> +>>> I implemented it (see branch ``paternal/libdirs``). I used [[smcv]]'s idea, but +>>> avoiding side effects. I edited documentation as well. As usual, as neither +>>> English nor Perl are my first languages (damn! I would be so much more +>>> efficient in Python) feel free to improve my [[!taglink patch]]. +>>> [[!template id=gitbranch branch=spalax/paternal/libdirs browse="https://github.com/paternal/ikiwiki/tree/paternal/libdirs" author="[[Louis|spalax]]"]] + +>>>> While reviewing and applying your patch I decided the new +>>>> "sometimes a list, sometimes not" behaviour of `libdir` was +>>>> too confusing in documentation, so I made it work like underlaydir(s) +>>>> instead: ikiwiki will now search each item of `$config{libdirs}`, then +>>>> `$config{libdir}`. [[done]] --[[smcv]] + +>>>>> Good. I cannot see any justification apart from historical reasons, but I +>>>>> agree with your choice. +>>>>> -- [[Louis|spalax]] [[!taglink wishlist]]