> 1) Should I pull out the template from the __DATA__ section and place
> the template in a separate file -- or possibly a few template files so a
> site's layout/design can be more easily included? If the script runs
> under SpeedyCGI or mod_perl then the template needs be in a separate
I think placing it in an external file makes more sense in many ways, as
you say, several different styles could be adopted and swapped more
Although, of course, if you separate the content from the presentation
completely by using stylesheets and all that, then you readlly only need
one template ;) No but serious, the first thing I did was to take the
> 2) The script doesn't include many features like being able to limit
> searches by meta names or select sort order. Are those features common
> enough that they should be included? I don't want it to be a drop-in
> replacement for swish.cgi -- it's suppose to be just a skeleton used as
> a starting point for programmers -- but I can see providing a few extra
> features might be nice.
> Should those changes be included? Namely better highlight support
> and metaname selection?
I think highlight support is important enough, and sort order would be
desirable. As for meta names, I have to translate my search syntax to the
swish-e search syntax anyway, so that is not important for me. I
think the search script is a nicer starting point as it is much easier to
understand (I had a look at swish.cgi and decided to go with the "simple"
> 3) swish.cgi has two example templates (for use with HTML::Template and
> Template-Toolkit). One is named swish.tmpl (for HTML::Template) but the
> other is named search.tt (for Template-Toolkit). That's unfortunate
> naming since it would seem like search.tt would work with search.cgi,
> which it doesn't.
> So, see any reason why search.tt shouldn't be renamed to swish.tt?
Yeah, renaming is a good idea. Got me confused as well.
Received on Thu Jun 3 03:14:36 2004