Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 104569
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: porton [...] narod.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Can't use TABLE plugin with STRICT mode
Date: Wed, 20 May 2015 19:42:58 +0300
To: bug-Template-Toolkit [...] rt.cpan.org
From: Victor Porton <porton [...] narod.ru>
When running the attached script with attached template, it produces an error (.defined method does not work). So, tables are practically unable to be used with STRICT mode. $ ./test-tt.pl var.undef error - undefined variable: elt.defined Template Toolkit 2.24-1.2+b1 on Debian Linux. perl 5, version 20, subversion 2 (v5.20.2) built for i586-linux-gnu-thread-multi-64int Workaround: Use [%TRY%]/[%CATCH%] to catch the error. Related bug: https://rt.cpan.org/Public/Bug/Display.html?id=91592 -- Victor Porton - http://portonvictor.org

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

From: ozcoder [...] gmail.com
Hi Victor, On Wed May 20 12:43:26 2015, PORTON wrote: Show quoted text
> When running the attached script with attached template, it produces an > error (.defined method does not work). > > So, tables are practically unable to be used with STRICT mode. > > $ ./test-tt.pl > var.undef error - undefined variable: elt.defined > > Template Toolkit 2.24-1.2+b1 on Debian Linux. > perl 5, version 20, subversion 2 (v5.20.2) built for > i586-linux-gnu-thread-multi-64int > > Workaround: Use [%TRY%]/[%CATCH%] to catch the error. > > Related bug: https://rt.cpan.org/Public/Bug/Display.html?id=91592 >
That's the way it is meant to work. See http://tt2.org/docs/manual/Config.html#section_STRICT Gordon
Subject: Re: [rt.cpan.org #104569] Can't use TABLE plugin with STRICT mode
Date: Thu, 11 Feb 2016 17:03:10 +0200
To: bug-Template-Toolkit [...] rt.cpan.org
From: Victor Porton <porton [...] narod.ru>
On Tue, 2016-02-02 at 23:14 -0500, ozcoder@gmail.com via RT wrote: Show quoted text
> https://rt.cpan.org/Ticket/Display.html?id=104569 >; > > Hi Victor, > > On Wed May 20 12:43:26 2015, PORTON wrote:
> > When running the attached script with attached template, it > > produces an > > error (.defined method does not work). > > > > So, tables are practically unable to be used with STRICT mode. > > > > $ ./test-tt.plĀ  > > var.undef error - undefined variable: elt.defined > > > > Template Toolkit 2.24-1.2+b1 on Debian Linux. > > perl 5, version 20, subversion 2 (v5.20.2) built for > > i586-linux-gnu-thread-multi-64int > > > > Workaround: Use [%TRY%]/[%CATCH%] to catch the error. > > > > Related bug: https://rt.cpan.org/Public/Bug/Display.html?id=91592 > >
> > That's the way it is meant to work. > See http://tt2.org/docs/manual/Config.html#section_STRICT > > Gordon
You've misinterpreted my request. I do not ask WHY it does not work. It is perfectly clear for me. Instead I ask to modify the counter- intuitive and counter-productive way it works now. elt.defined should work without exceptions independently on whether the variable elt is defined. Otherwise .defined becomes useless. There is .defined in your documentation. Documented features should always work not throw exceptions. My proposed change on how it should work is useful in practice. In the original bug report I have shown that currently tables are in way broken in TT. It should not be so.
Ticket migrated to github as https://github.com/abw/Template2/issues/170