tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@dedasys.com (David N. Welton)
Subject Re: putx {= bug
Date Fri, 28 Dec 2001 12:44:26 GMT
Andrej Vckovski <andrej.vckovski@netcetera.ch> writes:

> On Thu, 27 Dec 2001, Simon Hefti wrote:

> > I added it on Andrej's suggestion. It's a php idea.

> > Simon.

> I don't have any problems if we remove that. It was just thought as
> a short-cut. Just another stupid idea: what if we would make it even
> more flexible?

> (maybe a bad idea, but I write it anyhow)

> web::config puthook character command

> e.g.,

> web::config puthook = {web::put [subst %s]}

> so whenever the caracter following the markup is that special one,
> then the given command is substituted (%s the value of the marked
> content) and evaluated.

Very flexible, but what other, constructive things might be done with
this flexibility?  Why not just make = an alias for web::put if people
want that?  To me, the above looks rather complex for something
intended to simplify the life of the WebSH user.

The above is also wrong, and would cause errors - it would have to be:

web::put [web::response] [subst %s]

(this was the error that I filed the bug about)

> however, if we change the markup semantics so that not the marekd up
> content is evaluated rather that everything outside the markup is
> placed in a web::put, then this isn't really useful anymore.

Why not?  The output slated for "put'ing" has all the Tcl syntax
characters escaped, so that you don't have to worry about escaping
them all in the chunks of HTML code.  So, the original purpose would
still be useful.

However, I'm more in favor of making = an alias for web::put or
something along those lines, because it makes the system more Tcl
dependant rather than parser dependant.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Mime
View raw message