Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: Template::Latex not interpolating variables . . .

by ahmad (Hermit)
on Feb 08, 2010 at 21:11 UTC ( #822085=note: print w/replies, xml ) Need Help??

in reply to Re^2: Template::Latex not interpolating variables . . .
in thread Template::Latex not interpolating variables . . .

If your desired data is not shown, then you might be using the wrong data structure (Your hashref is not what you have expected).

Try using Data::Dumper to print out content of your hashref and see if it's indeed what you want.

If you still have problems with it, post the output of "print Dumper($call_list);" so I can have a look into it.

Replies are listed 'Best First'.
Re^4: Template::Latex not interpolating variables . . .
by hesco (Deacon) on Feb 10, 2010 at 03:38 UTC
    Ahmed: Here is a quick sample of some sanitized data. The arrayref assigned to the 'upstream' key consists of anonymous hashes with essentially the same data and keys as are assigned to the email address key to the call_list hashref. My script walks recursively through the data to build that anonymous array of 'upstream sponsors' for my client's sales team.

    This all looks right to me, but this is my first time using Template::Latex, though I have some experience with Template::Toolkit and HTML::Template.

    Do you see what I'm missing here? I sure don't and have been stumped on this one for a couple of days.

    Thanks for your help, for the second set of eyes.

    -- Hugh

    $VAR1 = { 'call_list' => { '' => { 'phone3' => '', 'uid' => '5999', 'fname' => 'Lynn', 'name' => 'ljames', 'phones' => '917-555-1212', 'upstream' => [ { 'phones' => undef } ], 'lname' => 'James', 'phone1' => '917-555-1212', 'phone2' => '' }, '' => {
    if( $lal && $lol ) { $life++; }
    if( $insurance->rationing() ) { $people->die(); }

      Your loop is wrong, you have emails as your hash keys and not the uid/fname etc you're trying to access directly.

      you'll have to try with an inner loop like this

      [% FOREACH customer IN call_list %] [% FOREACH info IN customer.value %] [% info.uid %] [% END %] [% END %]

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://822085]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2023-06-04 10:50 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (20 votes). Check out past polls.