On 10/04/2012 02:11 PM, Mark Haney wrote:
I've got a Template Toolkit template that is driving me insane. I've hit the
TT list, but it seems more and more like the problem may be more perl related
than a templating issue. I've attached the offending files so now let me show
what the problem is.
I have two SQL statements that pull factory data from one and shift data from
another. My problem is when the data gets passed to the template, I get the
'factories' array, but not the 'shifts' array. I did a data dump just after
the my $vars declaration of the perl code and get this:
markh@ubuhost:~$ cat /tmp/shifts.info
$VAR1 = \{
'shifts' => \[
do you realize those are refs of refs? odd seeing those here as they
should usually be just hash or array refs.
[
'First'
],
[
'Second'
],
[
'third'
],
[
'weekend'
]
],
'factories' => [
{
This can't really be that complicated can it? I mean, it makes no sense to
pass PART of the data in $vars, but not all. Can someone offer any suggestions?
without seeing how tt is being passed or accessing that data we can't
debug it. that is just data with no code.
and as an option, try looking at Template::Simple. it has a similar
markup to TT but is easier to use and is much faster. i can definitely
make your stuff work there (again, the template is needed).
uri
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/