[Perl-org-patches] combust on HTTP::Server::Simple

Eric Wilhelm enobacon at gmail.com
Mon Aug 24 17:49:11 GMT 2009


Hi all,

I did manage to get combust running on my debian etch system, but I'm 
not sure I really remember how I did it and I had to make a lot of ugly 
hacks to make it run.  In the end, it was too much of a pain and I just 
did the learnperl.scratchcomputing.com content in Shebangml.

But if you want to start with small changes to *.perl.org, you really 
need to be using combust so that the changes can simply be committed 
without tasking the admins to pickup some new infrastructure and deal 
with it.

Combust is theoretically very simple.  It's just a page-name-aware 
template engine.  The implementation is non-simple though because e.g. 
Combust::Control assumes that it is running under apache.

I think a VM is almost as much of a show-stopper as the current 
structure of things in terms of contributors being able to *quickly* 
setup and run a server from any system with a working perl+CPAN.

So, my thinking is to implement the combust template engine on 
HTTP::Server::Simple (or even HTTP::Server::Simple::Er) such that you 
can install some stuff from the cpan and then do:

  perl misc/runsite.pl --config whatever.conf

At a glance, it seems like a bit of a yak to shave.  Perhaps others with 
more experience in emulating Apache::Request can point me at some 
examples or take a look at Combust::Control and give me some advice?

Combust seems to boil down to basically just:

    my $output = eval {
     $self->tt->process($template, $tpl_params,
       { site => $tpl_params->{site} } ) };

That is, once you get through the bit where Combust::Control and 
Combust::Config both execute some code at require-time which expects to 
find a config file in some environment variables.

If we can crack that nut, running a local combust won't require apache.

Thanks,
Eric
-- 
The first rule about Debian is you don't talk about Debian
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------



More information about the Perl-org-patches mailing list