I have a method that uses the "Want"-Module to act dependent on context.
This works very well but when I call this method from within a template
Perl crashes (no Perl error message, just a dialogue box saying that
Perl had to be stopped).
Here is some code to show the problem:
sub pretty_print {
  # ... build some $output ...
  want('VOID') ? print $output : return $output;
}
then within a template:
[% object.pretty_print %]

Further experiments indicate that the crash does not depend on a
specific context that is checked, a simple
$somevar = 'foo' if want(<whatever>);
somewhere within the method is enough to trigger the crash.

This is with Strawberry Perl 5.10 under Windows.

Any ideas?

-Michael

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to