perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject RE: [ep2] using options like optDisableHtmlScan with Embper::Execute
Date Thu, 02 Dec 2004 05:36:03 GMT
> 
> I'm using embperl as a template engine in a non-mod_perl 
> context.  I have embperl1 code like:
> 
>            $HTML::Embperl::dbgShowCleanup = 1;
>             HTML::Embperl::Execute ({
>                 'debug' => 1,
>                 'escmode' => 0,
>                 'inputfile' => $ref->{'tpl_path'},
>                 'options' => HTML::Embperl::optDisableHtmlScan ()
>                     | HTML::Embperl::optDisableChdir ()
>                     | HTML::Embperl::optKeepSpaces ()
>                     | HTML::Embperl::optRawInput ()
>                     | HTML::Embperl::optDisableEmbperlErrorPage (),
>                 'output' => \$line,
>                 'param' => $ref->{'parameters'},
>             });
> 
> and I want to rewrite it to work with Embperl2.  I haven't 
> been able to figure out how to get at the constants.  

The Constant now live in Embperl::Constant, so replace 

HTML::Embperl::optKeepSpaces 

With

Embperl::Constant::optKeepSpaces


The optDisableHtmlScan, is no longer an option, instead change the syntax,
by passing

syntax => EmbperlBlocks

optRawInput is on by default, but is now set with

input_escmode => 0


> Also 
> still looking for the mapping from the documented environment 
> variables of the form EMBPERL_* to hash keys for 
> Embperl::Execute. 

perldoc Config.pod

Will show you the env vars, the excute parameters and the method names to
access it in the page

Gerald






---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message