in reply to Trouble with CGI / HTML::Template

You say that you tested your data, but this line:

$account->{transactions} = \{get_transactions($account->{transactions_ +id})};

... feels suspicious to me. I think you're double-referencing things here, given that get_transactions already returns a hash reference.

I suggest you compare the Data::Dumper output of your data structures and pay very close attention to whether you get a hash reference or a reference to a hash reference:

>perl -MData::Dumper -wle "warn Dumper \{ foo => bar }; warn Dumper { +foo => bar }" Unquoted string "bar" may clash with future reserved word at -e line 1 +. Unquoted string "bar" may clash with future reserved word at -e line 1 +. $VAR1 = \{ 'foo' => 'bar' }; $VAR1 = { 'foo' => 'bar' };

Also, "I have an ISA problem" is not a very good error description. Maybe you want to tell us the exact error message that HTML::Template gives you?

Replies are listed 'Best First'.
Re^2: Trouble with CGI / HTML::Template
by jms53 (Monk) on Mar 31, 2013 at 14:41 UTC

    After attempting to debug all possible dereferencing possibilities, it turns out there are far more bugs with this code than just attempting to return a hash instead of a hash-ref around.

    I'm going to start this from scratch

    J -