Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: randy.lauen [...] gmail.com
Cc:
AdminCc:

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



Subject: Calling import on a list outputs the list's address
Date: Tue, 6 Sep 2016 12:16:15 -0500
To: bug-Template-Toolkit [...] rt.cpan.org
From: Randy Lauen <randy.lauen [...] gmail.com>
Calling the import method on a list causes the list's address to be printed. This does not happen when calling import on a hash. I'm using Template v2.24 with Perl 5.20. Here's the example code from the POD for import on a list and on a hash [% one = [ 1 2 3 ]; two = [ 4 5 6 ]; three = [ 7 8 9 ]; one.import(two, three); one.join(',' ); # 1, 2, 3, 4, 5, 6, 7, 8, 9 %] [% hash1 = { foo = 'Foo' bar = 'Bar' } hash2 = { wiz = 'Wiz' woz = 'Woz' } %] [% hash1.import(hash2) %] [% hash1.wiz %] Saving that to test.html and then running this: perl -MTemplate -e'Template->new()->process("test.html");' Results in this output: ARRAY(0x6f51c8)1,2,3,4,5,6,7,8,9 Wiz Finally, the example code in the POD for the import method on a list is missing the closing single quote in the call to join: one.join(', ); # 1, 2, 3, 4, 5, 6, 7, 8, 9
Ticket migrated to github as https://github.com/abw/Template2/issues/134