perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Chamas <>
Subject Re: Plea for an unneccesary(?) enhancement to Apache::ASP
Date Tue, 21 Aug 2001 21:23:05 GMT
Henrik Tougaard wrote:
> The resulting ASP code will then look soemwhat like this:
>   <INPUT type="text" name="arbst_navn" value="<%=
> $Server->HTMLEncode($arbst->{arbst_navn}) %>" tabindex="1">
> which is even more unreadable than before.

If you created a subroutine in global.asa like:

sub encode { $Server->HTMLEncode(@_) }

Then this code could have looked like:

 <INPUT type="text" name="arbst_navn" value="<%= encode($arbst->{arbst_navn}) %>"

> Therefore I would like to have a new tag [eg '<%-' but I am open (very open)
> for better suggestions] that automatically HTMLEncodes the text inside the

which is not much more typing than <%- %> ... I worry about starting
to add tag extensions to Apache::ASP because one of it virtues 
when compared to other environments is the simplicity in which
perl is embedded.

> It couldbe done with a XMLsub, but isn't that a bit overkill. Of course
> adding a
> new tag  could also be construed as overkill :)

The XMLSub that I sent in the separate benchmarking email may
or may not be overkill ... you could call the tag something like
<encode:input /> or <input:escape /> if you like which might 
create a conscious effort on the part of you developer to use.

Also, you could consider using FormFill functionality,
where all you would have to do in the above example to 
set the input field is:

<% $Response->{Form}{arbst_navn} = $arbst->{arbst_navn}; %>

Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA                1-714-625-4051

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message