bliako has asked for the wisdom of the Perl Monks concerning the following question:
I have hit a wall with the template system Text::Xslate. I can't find how to modify an array element or append to a hash or array. It keeps telling me it is forbidden.
I can do this: : my $arr=[1,2,3]; but I can not do this : $arr[1] = 12; Neither this: my $y = {a=>1,b=>2}; $y['c'] = 3; All is forbidden!
Do I miss something or is this kind of thing discouraged and I have to rethink it? But I need to transform even a little bit the data sent to the template.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Text::Xslate : append to hash or array?
by choroba (Cardinal) on May 12, 2020 at 13:04 UTC | |
by bliako (Abbot) on May 12, 2020 at 13:34 UTC | |
by Your Mother (Archbishop) on May 12, 2020 at 17:33 UTC | |
by bliako (Abbot) on May 12, 2020 at 22:37 UTC | |
|
Re: Text::Xslate : append to hash or array?
by pryrt (Abbot) on May 12, 2020 at 14:26 UTC | |
by bliako (Abbot) on May 12, 2020 at 14:43 UTC |