On Sep 29, 2006, at 12:38 PM, Alexander Koeppe wrote:
Hi List,I've observed a problem with mod_perl2 and HTML::Template VERSION: 2.8.If I create a new template object with my $template = HTML::Template->new( filename => "menu.html", path => [ "/path/to/templates", "/also/path/to/templates" ] );and restart Apache only the first path is left in the path array and only templates in that directory will be found.If I start that script without mod_perl2, all items are in the path array and also templates in the second directory will be found.
i don't have an exact answer, but I have two suggestions: first suggestion:try using a Data Dumper trace under both environments, and see if any of the internal vars are different i get tired of dealing with the Data::Dumper internals and methods, so i just keep a dumb class around for this stuff...
my $dumper= dumpObj->new();
$dumper->{'template'}= $template;
$dumper->__DUMP__();
secondly-
never 'restart' apache under modperl. always do a stop/start.
you'll encounter unnecessary memory growth with a restart.
========
package dumpObj;
sub new {
my $proto= $_[0];
my $class= ref($proto) || $proto;
my $self= bless ( {} , $class );
return $self;
}
sub __DUMP__ {
my ( $self )= @_;
print STDERR "\n==================== DUMPING \n";
print STDERR (ref $self) . "\n";
use Data::Dumper();
print STDERR Data::Dumper->Dump( [$self] , [qw(self)] );
print STDERR "\n==================== DONE \n";
return 1;
}
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.