Always mention which version of HTML::Template and CGI::Application you are using (they're important details).

You should be using version 2.6 of both the modules (the latest at this time).

About $SIG{__DIE__} being overriden, I see no issues with that (nor do I see him explicitly overriding $SIG{__DIE__} in the module). He uses CGI::Carp, which is just a wrapper around the Carp module, which is very stable and mature (and reccomended).

AFAIK, CGI::Application does not do anything weird, check it out:

sub load_tmpl { my $self = shift; my ($tmpl_file, @extra_params) = @_; # add tmpl_path to path array of one is set, otherwise add a path +arg if (my $tmpl_path = $self->tmpl_path) { my $found = 0; for( my $x = 0; $x < @extra_params; $x += 2 ) { if ($extra_params[$x] eq 'path' and ref $extra_params[$x+1] and ref $extra_params[$x+1] eq 'ARRAY') { unshift @{$extra_params[$x+1]}, $tmpl_path; $found = 1; last; } } push(@extra_params, path => [ $tmpl_path ]) unless $found; } require HTML::Template; my $t = HTML::Template->new_file($tmpl_file, @extra_params); return $t; }
Now, I don't see a template method anywhere in CGI::Application, or HTML::Template, so I'd like to take this opportunity to request that you provide us with a minimal test case that demonstrates this bug, as it is most likely in your code (in the `template' method of your Foo module).

On a HTML::Template note, if you're interested, samtregar is the dude who released HTML::Template, and I've got info on proposed patch here. He's taking it under consideration (i already have 1 patch in there), but I think it's worth while (jeffa agrees ;). Check it out and let me know what you think ;)

Peace!

____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.


In reply to Re: mod_perl, CGI::Application, and HTML::Template: bad combination? by PodMaster
in thread mod_perl, CGI::Application, and HTML::Template: bad combination? by thraxil

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.