[pmwiki-devel] Variable Expansion Question.
Stirling Westrup
sti at pooq.com
Tue Oct 23 13:10:20 CDT 2007
Patrick R. Michaud wrote:
> On Tue, Oct 23, 2007 at 08:31:44AM -0400, Stirling Westrup wrote:
>> I'm wondering if anyone has any insight on how Pm avoids recursive loops in
>> his variable expansion routines. I ask because I need to do something similar
>> and my reading of the PmWiki code has given me no insight.
>
> PmWiki handles this within PageTextVar() -- when performing a
> substitution for {$$foo}, it first removes any instances of
> {$$foo} from the replacement string. This prevents any form of
> self-recursion from taking place.
>
> PmWiki doesn't handle the case of indirect recursion of page text
> variables... but that doesn't seem to occur very often in normal
> practice.
Thanks! Now at least I won't keep looking for an existing mechanism to do what
I need...
More information about the pmwiki-devel
mailing list