Re: [Templates] Apache::Template Status

[prev] [thread] [next] [Date index for 2005/05/23]

From: Geoffrey Young
Subject: Re: [Templates] Apache::Template Status
Date: 15:14 on 23 May 2005

Tony Fraser wrote:
> Hi All,
> 
> What's the status of Apache::Template and Apache2/mod_perl2? I found:
> http://www.modperlcookbook.org/~geoff/modules/experimental/ but I had to
> make fairly extensive minor changes just to get it to pass its own tests
> under mod_perl 2.0.0 and libapreq2 2.05-dev. 

yes, I haven't gotten around to updating it yet.  sorry about that.

> It looks like there were so
> pretty rash (good?) decisions about backward compatibility made around
> mod_perl-1.999_22 and libapreq 2.00. I also see there are several of the
> tests that are marked TODO that fail even after my changes.

I'll look into them.  but no, there were never any promises about mp2 being
back compat in any way with mp1, especially when you use some of the more
advanced features like Apache::Template does.

> The last time I looked (at least a year ago), it wasn't possible to
> have a single Apache::Template module which worked under both mod_perl
> 1 and 2.  Adding the changes to make it work under v2 meant it would
> no longer work under v1.

that's essentially still true, but it might be doable with some fancy
footwork.  the biggest issue for Apache::Template is figuring out which
mod_perl you're installing for at Makefile.PL time, since a box with only
mp2 would not be able to generate the XS for the mp1 version.  once we got
that down it would be simple to install both Apache::Tempalate and
Apache2::Template and have the user decide which to use.  some additional
abstractions within the code itself to minimize duplication would help, but
that requires more work, of course.

>
> Given that we really have to continue support for v1, we should either
> have a single Apache::Template module which auto-detects the version
> and Does The Right Thing, or have a separate Apache2::Template module
> which provides support for v2.

with the new Apache2:: namespace we could certainly do that.  but in truth,
supporting two modules is a pain, one that I needed to deal with when you
bumped the official version from 0.8 to 0.9.  it would be nice to integrate
the two modules.

however, something that's been nagging at me is that Apache::Template has
some semi-serious issues in its codebase that probably need addressing.  I
think I outlined these when I first announced the port, and IIRC they all
had to do with directive merging.  the most specific one I recall was that
because the template object is cached globally, the first location to be hit
ends up defining the objects properties, so really all of the directives
should have per-server only scoping to be consistent.  also, I think there
is a problem in how parents and children merge due to a long-standing
misunderstanding and misdocumentation in how mod_perl itself handles merges.
 but while these are semi-serious in my eyes Apache::Template has been
around long enough that they obviously don't represent a problem for the
community, so I'm happy to let them continue :)  I only brought it up
because if we were to combine mp1 and mp2 versions into a single distrubtion
some reqwriting would be required, which would be a great time to address
these issues.

>
> I know this subject has come up on the list before, but I don't recall
> the outcome or current state of play.  But I'm more than happy for you
> and/or other interested parties to thrash it out and bring it all up
> to date.

yes, I'm willing to contribute as well, at least in part (I'm not really an
Apache::Template user, just trying to do my part to help folks with mp2).
and I'm happy to let andy decide what the path forward ought to be, since
the module is essentially his - for the 2.0 version all I did was the
minimum required to get it to run in the same manner as it did with 1.0
(features and all :)

--Geoff


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Apache::Template Status
Tony Fraser 21:22 on 22 May 2005

Re: [Templates] Apache::Template Status
Andy Wardley 06:50 on 23 May 2005

Re: [Templates] Apache::Template Status
Geoffrey Young 15:14 on 23 May 2005

Generated at 20:13 on 05 Jun 2005 by mariachi v0.52