Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Text-Xslate CPAN distribution.

Report information
The Basics
Id: 70516
Status: new
Priority: 0/
Queue: Text-Xslate

People
Owner: Nobody in particular
Requestors: rod.taylor [...] gmail.com
Cc:
AdminCc:

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



Subject: TTerse Restriction
Manipulation of a complex structure appears to be disallowed, or not obvious to me how to do it. This very simple template results in the error "Cannot modify ., which is not a lexical variable" [% hashVar = {junk => 1} %] [% hashVar.newVal = 2 %] This appears to be disallowed as well. [% hashVar = {junk => 1} %] [% hashVar.junk = 2 %] I have a controller which feeds a single dataset to a number of different views. One view outputs a summary of the data which requires manipulation of values within the hash to accomplish. The general purpose aggregator for this one view type does not know the full structure of hashVar. This does something interesting but not what I want. [% hashVar = {junk => 1} %] [% hashVar = {hashVar.kv(), newVal => 2} %] [% hashVar | dump %] Output: { '1' => undef, 'ARRAY(0x74b3448)' => 'otherValue' } Any ideas on how to manipulate values within a hash? I actually want to poke a couple of layers deep because I am building an array of hashes for the summary information.