[Perl-org-patches] voiding my Combust warranty
    Eric Wilhelm 
    enobacon at gmail.com
       
    Thu Sep  3 06:53:02 GMT 2009
    
    
  
I seem to have discovered the simplest thing that could possibly 
evaluate a template.
I'm not sure yet if everything is a template.  Hard to get the handler 
logic from super() into my head in 15min bursts...
Ask?  My thinking is that a simple preview functionality is possible if 
we just get $path and treat that as a template name.  What am I missing 
there?
package Combust::Request::None;
use base 'Combust::Request';
sub _r {shift}
sub pnotes {shift->notes(@_)}
sub dir_config {'.'}
sub document_root {'.'}
sub req_param {''}
sub get_cookie {''}
1;
COMBUST_REQUEST_CLASS=None CBROOT=$PWD CBCONFIG=combust.conf 
perl -Ilib -MCombust::Notes -MCombust::Request::None -MCarp::Always -e 'use 
Combust::Control::Basic; warn my $c = Combust::Control::Basic->new; 
warn $c->tt->set_include_path($c->get_include_path); warn 
$c->evaluate_template("default_site/index.html")'
Thanks,
Eric
-- 
Like a lot of people, I was mathematically abused as a child.
--Paul Graham
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------
    
    
More information about the Perl-org-patches
mailing list