[htmltmpl] problem: Not an ARRAY reference in Expr.pm
Brought to you by:
samtregar
From: Marcin G. <mg...@fo...> - 2007-05-02 12:44:46
|
One in every few calls to my application ends with error desctribed below. I'm not sure when it started or what stared these errors. It doesn't depend on template, number of calls or something else, seems pretty random. Important: turning off cache seems to heal it. H::T version 2.9 H::T::Expr version 0.07 Not an ARRAY reference at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Template/Expr.pm line 238. Expr.pm snippet: sub output { my $self = shift; my $parse_stack = $self->{parse_stack}; my $options = $self->{options}; my ($expr, $expr_func); # pull expr and expr_func out of the parse_stack for cache mode. if ($options->{cache}) { $expr = pop @$parse_stack; $expr_func = pop @$parse_stack; } else { $expr = $options->{expr}; $expr_func = $options->{expr_func}; } # setup expression evaluators my %param; for (my $x = 0; $x < @$expr; $x++) { # <---- l. 238 is HERE ----------- my $node = $expr->[$x]; $param{"__expr_" . $x . "__"} = sub { _expr_evaluate($node, @_) }; } $self->param(\%param); I dumped variables before the loop and got this about $expr: type = SCALAR value = SCALAR(0xfc7a2a0) value2 = "<br> on-line: <b>" I can provide more info but not sure what's important. best regards -- Marcin Gryszkalis, PGP 0x9F183FA3 jabber jid:mg...@fo..., gg:2532994 http://the.fork.pl |