Can't locate object method "no_way" via package "Test"
But when I run it inside a template, the template processing completes normally with no hint of an error! Is there any way to tell TT that when my program dies, I'd like to know about it?
I can reproduce the symptoms with this test prog and template:
test.pl: ======= package Test;
use Template;
my $tt = Template->new( {
INCLUDE_PATH => [ '.' ],
} );my $out;
if($tt->process('foo.tt', {}, \$out)) {
print "normal - ", $out
} else {
die "error - ", $tt->error;
}sub foo {
print STDERR "\nentering foo\n";
my $self = shift;
$self->no_way();
print STDERR "\nleaving foo\n";
}1;
foo.tt: ======
HELLO from foo.tt
[% USE me = Class('Test') ; me.foo %]
GOODBYE
and the output: ==============
entering foo normal - HELLO from foo.tt
GOODBYE
Thanks and regards, Dave
_______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
