[ic] include interpolation

Mike Heins mike at perusion.com
Mon Dec 6 19:09:09 UTC 2010


Quoting Peter (peter at pajamian.dhs.org):
> On 07/12/10 02:40, Paul Jordan wrote:
> > 
> > In line with my last barrage of emails regarding interpolation... Can
> > someone say if it is possible that the interpolation setting (while
> > correct in the code) may have been showing as opposite in the docs?
> > 
> > http://docs.icdevgroup.org/cgi-bin/online/tags/include.html
> > 
> > That would be backwards correct?
> > 
> > I'm interested in knowing about the rest of the docs because, while
> > after discussing it on list I came to find out that I understood things
> > to operate slightly differently (technically), but in practice would
> > have vivified in line.
> > 
> > I believe I understood things to operate differently because I
> > explicitly remember seeing "interpolate" listed as "yes" almost every
> > single time I looked a the docs (circa 2001 - 2003) - and now as you
> > know, I am finding the opposite showing in the docs.
> > 
> > I guess I am really wondering if I am losing my mind - only because the
> > memories of seeing that are so vivid... almost as vivid as when I
> > travelled to Mars with my Velluptian space wife.
> 
> [include] is a weird one.  It does interpolate its output, but it does
> so explicitly with:
> 
>         my $out = Vend::Interpolate::interpolate_html(
>                                         Vend::Util::readfile($file,
> undef, $locale)
>                                 );
> 
> So technically the tag does not have the interpolate setting turned on,
> but practically speaking it does interpolate the output.  It could be
> correct to write the docs either way and the RTFM docs do in fact say
> "yes" for the interpolate attribute.
> 
> Why it does it this way rather than setting the Interpolate attribute is
> beyond me.  At a guess the tag was originally written before the
> interpolate attribute came about, but probably only Mike knows for sure.

It is an include, not anything else. It is designed to spit out a file
as if it was in the page, not to process it. At one point it was done
directly, but the minimal checking was added as a small measure to
prevent infinite recursion.

If you want to put the contents of a file in without reparse, you
can use [file].

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.328.4479  <mike at perusion.com>

An amateur practices until he gets it right. A pro
practices until he can't get it wrong. -- unknown



More information about the interchange-users mailing list