>
> As I said before, I can see EmbperlObject being useful in a dual sense -
> both as an interpreter of embedded Perl code, and as a "construction
> engine" for OO websites through the EMBPERL_OBJECT_BASE functionality.
>
> JMHO, I'd be interested to see what Gerald thinks of all this (more
> work! agh!)
>
I think including/"executing" plain html files, without interpreting them,
in the way you describe it, is really usefull and I already have planed to
implement it, but not in 1.3. It's on my roadmap for 2.0b2. Embperl 2.0 will
be much more flexible, by the possibility to define your own syntax. So one
Syntax will be just to do nothing with file. It will surely not a part of
1.3.0, because I don't like to make any changes in 1.3, but release 1.3.0
very soon (hopefully this week).
------
> gerald, is there a nicer way to do set the status, then exit ?
Currently there is no other way to set the return status. It's on the TODO
list...
>
> Apache::exit isn't actually documented anywhere, but being able to
> call exit(404) directly would be cool.
>
Embperl's exit is an alias to Apache::exit, but it doesn't pass the value to
Apache at the moment.
> how about getting the filename of '*' ?
There some (yet undocumented) methods to get these values:
$req -> ReqFilename returns the filename of '*'
$req -> Path returns the search path
$req is the first parameter that is passed to every Embperl file (i.e. $req
= shift )
There is a function that performs the path search, which is necessary for
EmbperlObject:
$Inputfile = $req -> ReqFilename ;
$path = $req -> Path ;
HTML::Embperl::CheckFile ($Inputfile, $req_rec, 0, $allow, \$path, $debug)
Set $debug to 1 to get debugging output in the logfile and $allow, if given,
is a regex with defines which files are allowed.
With these methods/function you should be able to extent the Include
solution from Angus to be "EmbperlObject aware" to have a workaround until
Embperl will nativly support including plain html files.
------
> Obviously it would be undesirable to let arbitrary Perl code be included
> in such HTML files, so I will be stripping out all instances of the
> following tokens when files are uploaded or edited:
>
> [-
> [+
> [!
> [*
> [$
>
> ... and the closing versions of these tokens too.
This should work, but it would be enougth to substitue every [ by [[. Then
Embperl will not execute any Perl code. Addtionaly you should set the option
to disable interpretation of HTML Tags (optDisableHtmlScan)
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]