The constructs suggested in the original email are similar if not identical to
embperl's (or php's for that matter), I was merely pointing out that we shouldn't 
probably reinvent the wheel with yet another pseudo-scripting language.

The embperl page needs not contain the actual perl code to process the data but 
rather use an external module for that, with the added advantage that (under 
apache/mod_perl) it gets compiled only once.

--
Regards,
L.C.
Network Admin @ InfoStreet
(818) 776 8080 x213

> You're missing the point of separating the code and the interface.
> 
> On Thu, Aug 10, 2000 at 10:00:48AM -0700, L.C. wrote:
> > 
> > You may want to take a look at Embedded Perl (Embperl), it does EXACTLY what
> > you are asking and much more, it is a very good tool for building interfaces
> > in perl. http://perl.apache.org/embperl/index.html
> > 
> > You can then include separate header files too, although you realize that you
> > will eventually end up with XML or style sheets to get a consistent look all 
> > around without changing every FONT tag in the page :-)
> > 
> > > 
> > > And this in the template:
> > > 
> > >    [% IF show_tech_contact %]
> > >    <tr><td colspan=2 align=center><b>Tech Contact Information</b></td></tr>
> > >    <tr>
> > >    <td valign=top>
> > >    $data->{tech_first_name} $data->{tech_last_name}<BR>
> > >    ......
> > >    [% END %]
> > > 
> > > You are also doing something similar with this code in do_setup_profile in
> > > reg_system.cgi:
> > > 
> > >     $HTML{domains} = join "<br>\n", @domains;
> > > 
> > > The separator between the domains should be controlled by the template, not the
> > > code. If you had a better templating solution (like the Template-Toolkit module
> > > from CPAN), you could write the code like this:
> > > 
> > >     $HTML{domains} = [ @domains ]; # pass a list of domains to the template
> > > 
> > > Then in the template:
> > > 
> > >    [% FOREACH domain = domains %]
> > >       [%$domain%]<br>
> > >    [% END %]
> > > 
> > > Then you allow the flexibility for people to modify just the template to be
> > > something like:
> > > 
> > >    <ul>
> > >    [% FOREACH domain = domains %]
> > >       <li>[%$domain%]
> > >    [% END %]
> > >    </ul>
> > > 

Reply via email to