[Catalyst] Template::Plugin::Latex 3.00_05 and catalyst

Francesc Romà i Frigolé francesc.roma+catalyst at gmail.com
Thu Feb 28 13:46:24 GMT 2008


Hello,

Andrew Ford has made available developer's releases of the next
version of the Template::Plugin::Latex. Version 3 has several nice
improvements over version 2: it detects if the latex file need more
compilation runs and it provides a TT filter for latex encoding, among
other features.

You can get it here:
http://search.cpan.org/~andrewf/Template-Plugin-Latex-3.00_05/

I'm trying to use this version from within Catalyst, and I doesn't
work, probably due to the bug in the standaralone server where all
system calls return -1. This bug and a workaround are discussed here:
http://catalyst.perl.org/calendar/2006/12

The weird thing is that the workaround doesn't work for me with
version 3 of the T:P:Latex, but if I force  (in the T:P:Latex code,
not in my application) the return value of the system call to be 0,
then it works. The hack proposed in the catalyst calendar looks like
this, and I can't see anything that would make it work only for a
particular version of a plugin.

     {
       no warnings 'redefine';  # right here, you can tell bad things
will happen
       local *Template::Latex::system = sub {

         my $ret = system(@_);

         # guesstimate whether the system call was successful or not

         return 0 if ( guess == OK );
         return $ret;
       } if $c->engine =~ /^Catalyst::Engine::HTTP/;


Any ideas why it doesn't work?
Thanks,
Francesc



More information about the Catalyst mailing list