[dancer-users] Iteration of hash in template.
Richard Reina
gatorreina at gmail.com
Wed Sep 30 22:41:46 BST 2015
2015-09-30 15:17 GMT-05:00 Alex Mestiashvili <mailatgoogl at gmail.com>:
> Just look it up on metacpan.org, it is very useful for debugging.
>
> with debug you can log something in the log file,
> I usually start a dancer app with plackup -a /bin/app.(psgi|pl)
> and monitor what is happening in the output.
>
> if you prefer to use print, then you need to write it this way:
>
> print Dumper($pats_ref);
>
>
>
Well something somewhat strange has happened. When I do: print
Dumper($pats_ref) . "\n"; from the perl module that handles the DB query it
only prints one row:
$VAR1 = {
'8' => {
'ID' => '8',
'ANAME' => 'KOB',
'opp_team' => 'Cardinals',
'YEAR' => '2015',
'date' => '2015-09-04',
'AMOUNT' => '2.00',
'IDD' => '3',
'CHNAME' => 'DWB',
'CHLG_ID' => '12',
'SPONSOR' => 'MPK',
'season' => 'Fall'
}
};
This is baffling and very frustrating because when I do the exact same
query from the MySQL console it yields 3 row and not 1 row.
ID | CHLG_ID | season | YEAR | date | opp_team | NAME |
NAME | AMOUNT | sponsor |
+----+---------+--------+------+------------+----------+-----------+-----------------------------+--------+---------+-------------
| 8 | 9 | Fall | 2015 | 2015-09-04 | Cardinals | KOB | AFA
| 2.00 | MPK |
| 8 | 12 | Fall | 2015 | 2015-09-04 | Cardinals | KOB | DWB
| 1.00 | RFR |
| 8 | 12 | Fall | 2015 | 2015-09-04 | Cardinals | KOB |
DWB | 2.00 | MPK |
+----+---------+--------+------+------------+----------+-----------+-----------------------------+--------+---------+
Any insight as to why this might be happening would be greatly, greatly
appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150930/3a9061fb/attachment.html>
More information about the dancer-users
mailing list