[pmwiki-devel] strange conversions: a FmtPageName bug

Hans design5 at softflow.co.uk
Sun Mar 9 09:57:35 CDT 2008


Sunday, March 9, 2008, 2:36:58 PM, Patrick wrote:

> The way to prevent these from becoming global would be
> to put all of initialization steps into separate functions
> (thus making these variables local).  While we could do this
> for PmWiki, we'd still have global variables leaking out
> via recipes and local customizations.

Perhaps, but it would make it a lot cleaner and especially avoid one
character variables, or very short variables, or indeed all lowercase
variables from Pmwiki. Recipes and customisations can always mess
things up, but PmWiki can set a good example.

> Another possibility might be to adjust FmtPageName so that
> it only substitutes variables that begin with a capital letter.

I think this would be beneficial. We got a fairly established culture
of declaring only variables global which have a capital first letter.
We could make it a policy or highly recommended practise.

I am in favour of implementation of both measures (initialization
within functions and variable substitutions for capital first letter
variables only in FmtPageName.

At least it will blunt the aggressive var substitutions.


Hans




More information about the pmwiki-devel mailing list