[Petal] mod_perl segfaults / test scripts

Jean-Michel Hiver jhiver@mkdoc.com
Sat, 27 Jul 2002 17:57:12 +0100


--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi list,

  William McKee <william@knowmad.com> reported problems with mod_perl
  segfaulting with Petal, however I cannot reproduce it on my local
  machine. I suppose it's a platform thing (running redhat 7.3 on an
  Athlon here).

  I've attached test.cgi and test.tmpl, two minimalistic example to
  ensure that everything works ok under Apache::Registry. William, could
  you re-test this on your platform, and tell if it still core dumps?

  If it does, what platform are you running?

  It it doesn't what needs to be done in the template to make mod_perl
  core dump?

I'm looking forward to get this stuff sorted out as quickly as possible,
as a Perl templating engine that core dumps mod Perl might not be that
useful :-)

Best regards,
-- 
IT'S TIME FOR A DIFFERENT KIND OF WEB
================================================================
  Jean-Michel Hiver - Software Director
  jhiver@mkdoc.com
  +44 (0)114 255 8097
================================================================
                                      VISIT HTTP://WWW.MKDOC.COM

--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="test.cgi"

#!/usr/bin/perl
#
use strict;
use Petal;

my $template_file = 'test.tmpl';
my $template = new Petal ( base_dir => './',
	file => $template_file,
	disk_cache => 0,
	memory_cache => 0,
	taint => 1,
);
#$template::PARSER = "HTML";

my $hash = {};
my $html = $template->process (
	env => \%ENV,
	date => scalar localtime
);

print "Content-type: text/html\n\n";
print $html;


--pWyiEgJYm5f9v55/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="test.tmpl"

<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org" />
    <title>Test Page</title>
  </head>
  <body>
    <p>Hello, World, it is $encode:date!</p>
    <p petal:condition=":true env.MOD_PERL">It seems that we're running mod_perl...</p>
    <p petal:condition=":false env.MOD_PERL">It doesn't seem that we're running mod_perl...</p>
  </body>
</html>


--pWyiEgJYm5f9v55/--