Trying to get CA plus some plugins working under mod_perl.
CAP-AnyTemplate (v0.07) works fine as part of regular cgi script, but
when run under mod_perl:

Error executing run mode 'login': HTML::Template->new() : Cannot open
included file login.html : file not found. at
C:/usr/local/site/lib//HTML/Template.pm line 1616
        HTML::Template::_init_template('HTML::Template=HASH(0x3a0b8fc)')
called at C:/usr/local/site/lib//HTML/Template.pm line 1189
        HTML::Template::_init('HTML::Template=HASH(0x3a0b8fc)') called
at C:/usr/local/site/lib//HTML/Template.pm line 1083
        HTML::Template::new('HTML::Template', 'associate',
'CGI=HASH(0x394424c)', 'filename', 'login.html', 'path',
'ARRAY(0x3754440)') called at
C:/usr/local/site/lib//CGI/Application/Plugin/AnyTemplate/Driver/HTMLTemp
late.pm line 192
        CGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplate::init
ialize('CGI::Application::Plugin::AnyTemplate::Driver::HTMLTemplate=H...'
) called at
C:/usr/local/site/lib//CGI/Application/Plugin/AnyTemplate/Base.pm line
43
        CGI::Application::Plugin::AnyTemplate::Base::_new('CGI::Applicati
on::Plugin::AnyTemplate::Driver::HTMLTemplate', 'driver_config',
'HASH(0x374b934)', 'native_config', 'undef', 'include_paths',
'ARRAY(0x3754440)', 'filename', 'login.html', ...) called at
C:/usr/local/site/lib//CGI/Application/Plugin/AnyTemplate.pm line 614
        CGI::Application::Plugin::AnyTemplate::load('CGI::Application::Pl
ugin::AnyTemplate=HASH(0x39df9cc)') called at
/127.0.0.1/perl/hilis4/HILIS4.pm line 177
        HILIS4::login('HILIS4=HASH(0x3944378)') called at
C:/usr/local/site/lib//CGI/Application.pm line 154
        eval {...} called at C:/usr/local/site/lib//CGI/Application.pm
line 153
        CGI::Application::run('HILIS4=HASH(0x3944378)') called at
C:/127.0.0.1/perl/hilis4/hilis.pl line 11
        ModPerl::ROOT::ModPerl::Registry::C_3a_127_2e0_2e0_2e1_perl_hilis
4_hilis_2epl::handler('Apache::RequestRec=SCALAR(0x200f9a0)') called at
C:/usr/local/site/lib/Apache2/ModPerl/RegistryCooker.pm line 202
        eval {...} called at
C:/usr/local/site/lib/Apache2/ModPerl/RegistryCooker.pm line 202
        ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0x39441f8)')
called at C:/usr/local/site/lib/Apache2/ModPerl/RegistryCooker.pm line
168
        ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(
0x39441f8)') called at C:/usr/local/site/lib/Apache2/ModPerl/Registry.pm
line 30
        ModPerl::Registry::handler('ModPerl::Registry',
'Apache::RequestRec=SCALAR(0x200f9a0)') called at -e line 0
        eval {...} called at -e line 0

The above will probably wrap badly in transit, but was the browser
output from CGI::Carp qw/fatalsToBrowser/.

I am puzzled why HTML::Template is mentioned so often as I have
configured AnyTemplate to use TemplateToolkit only:

use constant AT_CONFIG => { # hashref for use in AnyTemplate:
  type => 'TemplateToolkit',
  include_paths => [
    TMPL_PATH,
    TMPL_PATH . '/HILIS4',
  ],

  TemplateToolkit => {
    TAG_STYLE => 'asp', # <% ... %>
    INTERPOLATE => '1', # use $vars
    WRAPPER => 'hilis.tmpl',
  }
};


$self->template->config(
    Configs->AT_CONFIG,
);

and login() is:

sub login { # AnyTemplate method
  my $self = shift; # print $fh Dumper($self);

  $self->template->fill();
}

Substituting CAP-TT for CAP-AnyTemplate in the same script works OK as
cgi script and under mod_perl.

I'm using Apache2 and mod_perl 1.99 and 2.00 (2 different Win32 setups).
CAP itself is v 4.00.

Is it me (likely) or an issue between CAP-AnyTemplate and mod_perl?
-- 
Richard Jones
Leeds, UK
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to