On Sat, 23 Feb 2002, Stefan Seifert <[EMAIL PROTECTED]> wrote,

> Would it be possible to include the colon as valid character for
> template variable names?
> Using it works already (at least in my HTML::Template version) but I
> don't want to use it unless it's officially sanctioned.
>
> With this I could use a syntax like this: OBJECT:ID/METHOD.ATTRIBUTE
>
> without it would be something like OBJECT/ID/METHOD.ATTRIBUTE but that
> would be ugly (at least in my eyes) and more difficult to parse.

It's the question number 8 in FAQ (part of the manpage).

       8   Q: What characters are allowed in TMPL_* NAMEs?
           A: Numbers, letters, '.', '/', '+', '-' and '_'.

I don't personally see any problem to include colon in the allowed
characters. But why the second alternatif is more difficult to parse? If
you have consistent syntax, it should be simpler.

    m!^(\w+):(\w+?)/(\w+)\.(\w+)$!;
    $object = $1;
    $id = $2;
    $method = $3;
    $attr = $4;

    m!^(\w+?)/(\w+?)/(\w+)\.(\w+)$!;
    $object = $1;
    $id = $2;
    $method = $3;
    $attr = $4;

-- 
san->http(www.trabas.com)
{If Linux doesn't have solution, you have the wrong problem}


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to