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' => \[ [ 'First' ], [ 'Second' ], [ 'third' ], [ 'weekend' ] ], 'factories' => [ { 'abbr' => 'AB', 'id' => '1' }, { 'abbr' => 'EBM', 'id' => '2' }, { 'abbr' => 'QEM', 'id' => '3' } ], 'cgi' => bless( { '.parameters' => [], 'use_tempfile' => 1, '.charset' => 'ISO-8859-1', '.fieldnames' => {}, 'param' => {}, 'escape' => 1 }, 'CGI' ) }; markh@ubuhost:~$ So, I KNOW that the data is there and SHOULD be passed to the template. However, when I do a datadump from the template I get this: $VAR1 = [ { 'abbr' => 'AB', 'id' => '1' }, { 'abbr' => 'EBM', 'id' => '2' }, { 'abbr' => 'QEM', 'id' => '3' } ]; $VAR1 = 'shift_rpt.pl'; 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?
shift_rpt.pl
Description: shift_rpt.pl
-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/