CountZero has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks!

Yesterday I installed the newest version of mod_perl (version 2.0.1) and now it seems none of my web-pages made with Template Toolkit (version 2.14) work.

Mod_perl seems to have changed their API and TT2 did not (yet) pick this up. The latest version of TT2 is 2.14 and that dates back to October 2004. Before I start bugging the author of TT2, does anybody know of a work-around? I tried to apply the changes to the mod_perl2 API to various TT2-modules, but now things as fundamental as XSLoader and Data::Dumper have stopped working. Seems I will have to re-install Perl ...

Oh yes, I'm on Windows XP, AS Perl 5.8.7 build 813.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Template Toolkit breaks under mod_perl2?

Replies are listed 'Best First'.
Re: Template Toolkit breaks under mod_perl2?
by perrin (Chancellor) on Jul 09, 2005 at 12:07 UTC
    Did you mean Apache::Template? There is a port for mod_perl 2. Check the mailing list archives for the TT list.
      I'll check that out. Thanks.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

        I'm using this port by Geoffrey Young; it works well. Be sure to read the documentation, though; not everything works exactly as it does with the standard Apache::Template. In particular, s/PerlModule/PerlLoadModule/ in your httpd.conf.

        --John

Re: Template Toolkit breaks under mod_perl2?
by PodMaster (Abbot) on Jul 09, 2005 at 11:30 UTC
    I'm sorry, but TT2 doesn't have much to do with mod_perl. Maybe you're thinking of Apache::Template?
    Before I start bugging the author of TT2, does anybody know of a work-around? I tried to apply the changes to the mod_perl2 API to various TT2-modules, but now things as fundamental as XSLoader and Data::Dumper have stopped working.
    Looks like you have bigger problems, maybe if you could report some error messages we could help you diagnose the problem better :/

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      I have re-installed Apache+modperl2 and Perl.

      I got Perl working again. Ordinary modperl works as well (a simple "Hello World" page worked).

      TT2 however remains stubborn.

      Template::Service::Apache tries to use Apache2::Request, which tries to use APR::Request::Param and this gives the following error:

      Can't load 'x:/webserver/Perl/site/lib/auto/APR/Request/Apache2/Apache2.dll' for module APR::Request::Apache2: load_file:The specified module could not be found at x:/webserver/Perl/lib/DynaLoader.pm line 230. at x:/webserver/Perl/site/lib/Apache2/Request.pm line 3

      Compilation failed in require at x:/webserver/Perl/site/lib/Apache2/Request.pm line 3.

      BEGIN failed--compilation aborted at x:/webserver/Perl/site/lib/Apache2/Request.pm line 3.

      Compilation failed in require at X:\webserver\Perl\site\lib\Template\Service\Apache.pm line 50.

      BEGIN failed--compilation aborted at X:\webserver\Perl\site\lib\Template\Service\Apache.pm line 50.

      The strange thing is that x:/webserver/Perl/site/lib/auto/APR/Request/Apache2/Apache2.dll is sitting right there! Only Dynaloader seems to have a problem with finding it.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

        ...The strange thing is that x:/webserver/Perl/site/lib/auto/APR/Request/Apache2/Apache2.dll is sitting right there! Only Dynaloader seems to have a problem with finding it.
        Its probably something Apache2.dll is trying to load that's not in your path. Try to view Apache2.dll with dependency walker, you'll see a list of dll's it needs. If you check the Application Log in Event Viewer the actual name of the module will probably be revealed.

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

      You are right, it is Apache::Template that is the problem, but as it is part of TT2, I used TT2 in a more general sense.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law