Re: debugging

Dave Howorth <dhoworth-fDajt2Yx3S8pY9vWkoisglpr/1R2p/[email protected]> Fri, 11 Dec 2015 12:10:32 +0000
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Organization MRC Laboratory for Molecular Biology
Message-ID <[email protected]>
Hmm,

I've found a way to make that error go away.

The keyword-index index included another template called shared.tt and
it had a line that said:

IF help.id ;

If I comment out that line and relevant code around it, the error goes
away. But if I substitute

IF help.id.defined ;

I still get the error.

Any thoughts on why that doesn't fix the error too?

Cheers, Dave

Dave Howorth wrote:
> I'm sure I've forgotten something simple about how to debug templates.
> 
> I have DEBUG_ALL on and I'm seeing this message:
> 
> 
> keyword-index: Template undef error - id is undefined
> 
> 
> keyword-index.tt is a template but it doesn't have any variable or
> component of a variable called id
> 
> 
> Neither do I see how to connect the error messages with any of the debug
> output above it, which is a bunch of lines similar to the last pair:
> 
> 
> [Template::Context] filter(lower, [ ]<no alias>)
> [Template::Filters] fetch(lower, <no args>,
> Template::Context=HASH(0xe614920))
> 
> 
> Any thoughts on how to identify my error gratefully received.