Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
We don't bite newbies here... much
 
PerlMonks  

Re: Nested loops in HTML::Template

by Coruscate (Sexton)
on Jan 20, 2004 at 01:28 UTC ( [id://322518]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Nested loops in HTML::Template

I don't know if it's your only problem, but you need to change push (@output, { 'row' => \@columns }); to push (@output, { 'day' => \@columns }); at least. The format you need to be returning from your sub is as follows:

return [ { day => [ { day => '' }, { day => '' }, { day => 1 }, { day => 2 }, { day => 3 }, { day => 4 }, { day => 5 } ] }, { day => [ { day => 6 }, { day => 7 }, { day => 8 }, { day => 9 }, { day => 10 }, { day => 11 }, { day => 12 } ] } ];

Update: After reverse engineering the data structure you're outputting from your subroutine, I do believe that is the only change you need to make (the one s/'row'/'day'/). It should then be fine as long as the match involved with your row/columing is correct.

Replies are listed 'Best First'.
Re: Re: Nested loops in HTML::Template
by jdtoronto (Prior) on Jan 20, 2004 at 02:38 UTC
    And in fact that change solves the problem!

    It seems to be another case of being too close to something for too long and not being able to see the problems! Thanks Coruscate

    Its 2:40am here now, so I am going to call it a day.

    jdtoronto

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://322518]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.