[Home]WikiCodeSuggestions/ConfigPrev

UseModWiki | WikiCodeSuggestions | RecentChanges | Preferences

Suggestions

Minor design ideas

Advantages

Disadvantages

OK I'm biased, but I honestly can't think of any other disadvantages - anyone else got any to offer?

Oh yes of course, the work involved in porting all your patches to the new wikimain when you only just finished porting them to v0.92. Well, would you be interested in a Perl script that split your existing wiki.pl into the three new ones? (no promises, but tell me here if you are interested...)

Example Code

I have now got some files which are something like the finished refactor would be (with the slight drawback that they don't run yet!). Come to http://river.redbricks.org.uk/WikiDemo/WikiFarm/ for a preview of how the code is split between the files. Of course you may prefer to wait till there is a working version...

Questions

I'd like your thoughts on these specific questions:

RiVer~~

R I think that security reasons suggest the default file to be in the same directory as wikimain.pl. I like the idea and support it strongly. -- ElMoro

It is for that reason that putting the scalars all into a hash looks interesting, but the disadvantage is that there are then three names used to reference each setting. With fairly minimal names that still leaves $WSet::Opt{"EditAllowed?"}.

That does have the advantage that it makes it obvious anywhere in the code that the reference is to a (possibly) customised setting.

Q: Is WSet (or WCfg) too short a name for a package? Would the Perl community be happier with $WikiConfig?::Setting{"EditAllowed?"} than $WSet::Opt{"EditAllowed?"} ?


UseModWiki | WikiCodeSuggestions | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited March 29, 2005 4:49 pm by MarkusLude (diff)
Search: