> -----Original Message-----
> From: Stas Bekman [mailto:[EMAIL PROTECTED]
> Sent: Sunday, October 19, 2003 10:17 AM
> To: [EMAIL PROTECTED]; Ayhan Ulusoy
> Subject: Re: porting Sandwich to mp2
>
> > Another thing :
>
> Again, please separate questions in separate threads. As these threads
> tend to
> grow big, it becomes really hard to manage them. Thanks.
[Ayhan] Again, sorry about that & thanks for splitting it.
> > would it not be better to separate plain-old response
> > handlers from, say, filters.
>
> What do you mean? Making it easy to derive from the handler's package
> whether
> it's a filter or not?
[Ayhan] Yes, that's exactly what I mean and the "::Filter::" prefix
seems good.
> Sure, go ahead and call your filter modules Apache::FilterFoo or
> Apache::Filter::Foo. I'm going to release shortly
> Apache::Filter::HTTPHeadersFixup and probably Apache::Filter::Debug.
>
[Ayhan] Hmmm.. That "Apache::Filter::Debug" sounds yummy...
> > Now that 1.99_10 is out, and that the filter API hasn't changed for
a
> > whole 6 months :), I'd like to release on CPAN a general-purpose
> > output-filter as a replacement for "Sandwich", but which can also
work
> > with wrapper templates (it's called CheeseBurger right-now).
> >
> > The code has been there for a while and works. I just need to add
> > support for the Sandwich options, so that it would be a drop-in
> > replacement.
> >
> > Under which namespace do I release it?
>
> Either Apache::Sandwich, or if you want to stress that it's a filter
> Apache::FilterLayers or Apache::FilterSandwich, or you might want to
poll
> the
> modperl list... Also it's probably a good idea to ask the owner of
> Apache::Sandwich whether they aren't working on a mp2 port already.
[Ayhan] Well, as you hint at it, this is probably not the right list to
discuss the "Sandwich" part of the name, where the mod_perl list would
probably be more appropriate. (whereas for "Apache::", I think it is
though and it is now in a separate thread.)
But now that we're at it, yes, I think it would be the least of things
to contact the author of "Sandwich" if it were an mp2 port, but it
isn't.
I am afraid I wasn't all too clear when I was talking about a "Sandwich
replacement".
This module (let's call it Apache::Filter::CheeseBurger) has been
inspired from, but actually quite different than, Apache::Sandwich,
processed HEADER & FOOTER parts.
CheeseBurger is a template-wrapper written from scratch to work with the
apache/mp 2 layered IO. It is Template-Toolkit compatible.
Enough publicity... Honestly, I have no stomach to try and implement
anything like that for mp1, especially when I know that 90% of the code
will go into a "if (mp1) {} else {}" statement.
Besides, why would people switch to apache2+mp2 if it doesn't bring
anything new and yummy, which they do and one of those is called layered
IO.
To my knowledge, there are 2 modules that have vaguely similar
functionalities on CPAN : "Apache::Sandwich" and
"Apache::SimpleReplace".
Both were written for mp1 with god knows how many hacks in them just to
emulate something that wasn't there in the first place. They would
simply require a complete re-write to work with the apache 2 layered IO,
and even then there wouldn't be a 100% functionality match between their
mp1 and mp2 versions.
On the other hand, people who have been using those modules would need
similar functionality in the mp2 world to feel at home.
So I thought, well, I could drop in support for the several PerlSetVar
options for those modules (HEADER & FOOTER for Sandwich, and TEMPLATE &
REPLACE for SimpleReplace) for an extra 2 cents of work. That way,
people could keep on using their existing documents. That's all.
Apache::Sandwich had a way of being called from within response
handlers. That, I can't replicate for example. Simply because we live in
a different filtering paradigm.
Instead of advertising to be an mp2 port of Apache::Sandwich and
breaking people's code behind their back, I'd rather leave that behind
and only suggest that if they need something similar to Sandwich
functionality, they can find it here. They wouldn't need to change much
unless they were doing funny stuff, but they would have been warned.
This leaves the author of Apache::Sandwich the option of doing a port
himself, or maybe I or somebody else could jump in and do that port at a
later time if it seems to be absolutely unavoidable.
Or maybe, Sandwich could be ported in a different way, by adding an "if
(mp >= 1.99_10)" switch at the start of its code so that it can delegate
most of its work to CheeseBurger or an equivalent module written
specifically for mp2 and takes full advantage of the filter frame-work.
That way, the mp2 module doesn't have to carry all the baggage of the
mp1 module (compilation overhead and so on).
That being said, I will contact the author anyway to see what can be
done.
Sorry for the long message. I think I got kind of carried away.
Cheers,
Ayhan
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]