Mailing List Archive

Question about HTML::EmbperlObject
Hi All,

HTML::EmbperlObject is a really *great* tool. To use it properly, i have
some questions :

<Location /blabla>
PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
SetHandler perl-script
PerlHandler HTML::EmbperlObject
</location>

work fine, of course.

But what i would like to do is to mix cgi, mod_perl, embperl and
EmbperlObject files in the same directory structure.

for example to have *.opl for EmbperlObject, *.epl for embperl, *fpl for
mod_perl and standard *.cgi.

Why ? Because sometimes, i have sometink like this :
_base.epl, which point to :
_head.html (static file)
my_frame.cgi (*not* a Embperl file !)
_foot.fpl (mod_perl file)

But I cannot find a working configuration to do it, all files in
<Location xxx> are evaluated as Embperl files - and the Handlers for CGI
and mod_perl are lost in space.

is there a way to do it ? On future versions maybe ?


Thanks for help.

Cordialement,
Phil.
Re: Question about HTML::EmbperlObject [ In reply to ]
pf wrote:

> Hi All,
>
> HTML::EmbperlObject is a really *great* tool. To use it properly, i have
> some questions :
>
> <Location /blabla>
> PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
> PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
> SetHandler perl-script
> PerlHandler HTML::EmbperlObject
> </location>
>
> work fine, of course.
>
> But what i would like to do is to mix cgi, mod_perl, embperl and
> EmbperlObject files in the same directory structure.
>
> for example to have *.opl for EmbperlObject, *.epl for embperl, *fpl for
> mod_perl and standard *.cgi.
>
> Why ? Because sometimes, i have sometink like this :
> _base.epl, which point to :
> _head.html (static file)
> my_frame.cgi (*not* a Embperl file !)
> _foot.fpl (mod_perl file)
>
>

<Location /blabla>
<FilesMatch "*\.opl$">
PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
SetHandler perl-script
PerlHandler HTML::EmbperlObject
</FilesMatch>
<FilesMatch "*\.epl>
SetHandler perl-script
PerlHandler HTML::Embperl
</FilesMatch>
etc. etc.
--
___cliff rayman___www.genwax.com___cliff@genwax.com___
Re: Question about HTML::EmbperlObject [ In reply to ]
WHOOPS

___cliff rayman___ wrote:

> pf wrote:
>
> > Hi All,
> >
> > HTML::EmbperlObject is a really *great* tool. To use it properly, i have
> > some questions :
> >
> > <Location /blabla>
> > PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
> > PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
> > SetHandler perl-script
> > PerlHandler HTML::EmbperlObject
> > </location>
> >
> > work fine, of course.
> >
> > But what i would like to do is to mix cgi, mod_perl, embperl and
> > EmbperlObject files in the same directory structure.
> >
> > for example to have *.opl for EmbperlObject, *.epl for embperl, *fpl for
> > mod_perl and standard *.cgi.
> >
> > Why ? Because sometimes, i have sometink like this :
> > _base.epl, which point to :
> > _head.html (static file)
> > my_frame.cgi (*not* a Embperl file !)
> > _foot.fpl (mod_perl file)
> >
> >
>
> <Location /blabla>
> <FilesMatch "*\.opl$">
> PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
> SetHandler perl-script
> PerlHandler HTML::EmbperlObject
> </FilesMatch>
> <FilesMatch "*\.epl>

make that <FilesMatch "*\.epl$">

>
> SetHandler perl-script
> PerlHandler HTML::Embperl
> </FilesMatch>
> etc. etc.
> --
> ___cliff rayman___www.genwax.com___cliff@genwax.com___
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org

--
___cliff rayman___www.genwax.com___cliff@genwax.com___
Re: Question about HTML::EmbperlObject [ In reply to ]
already tried this, Cliff :

Syntax error on line 36 of /usr/local/agora/conf/agora.conf:
<FilesMatch> cannot occur within <Location> section

and somethink like <FILESMATCH "/myDirectory/.*\.epl$">
doesn't work for HTML::EmbperlObject...

did you try it before to answer ? :-)

i tried to read the source code from Gerald Richter, but don't understand why
this doesn't work - it seems EMBPERL_OBJECT_BASE *must* be in a <Location
...> tag.

And with the following configuration :

<FILES ".epl">
SetHandler perl-script
PerlHandler HTML::Embperl
</FILES>
<FILES ".fpl">
PerlHandler Apache::Registry
AddHandler perl-script .fpl
PerlSendHeader off
</FILES>
<FILES ".cgi">
AddHandler cgi-script .cgi
</FILES>
<Location /freebank>
PerlSetEnv EMBPERL_OBJECT_BASE _base.html
PerlSetEnv EMBPERL_FILESMATCH "\.htm.?"
AddHandler perl-script .html
PerlHandler HTML::EmbperlObject
...

*.fpl (mod_perl) doen't work (of course, no Handler), and
*.cgi (standard CGI) and *.epl (Empperl) are not taken as EmbperlObject (of
course, but they work now...)




Phil.


___cliff rayman___ a écrit :

> pf wrote:
>
> > Hi All,
> >
> > HTML::EmbperlObject is a really *great* tool. To use it properly, i have
> > some questions :
> >
> > <Location /blabla>
> > PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
> > PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
> > SetHandler perl-script
> > PerlHandler HTML::EmbperlObject
> > </location>
> >
> > work fine, of course.
> >
> > But what i would like to do is to mix cgi, mod_perl, embperl and
> > EmbperlObject files in the same directory structure.
> >
> > for example to have *.opl for EmbperlObject, *.epl for embperl, *fpl for
> > mod_perl and standard *.cgi.
> >
> > Why ? Because sometimes, i have sometink like this :
> > _base.epl, which point to :
> > _head.html (static file)
> > my_frame.cgi (*not* a Embperl file !)
> > _foot.fpl (mod_perl file)
> >
> >
>
> <Location /blabla>
> <FilesMatch "*\.opl$">
> PerlSetEnv EMBPERL_OBJECT_BASE _base.epl
> SetHandler perl-script
> PerlHandler HTML::EmbperlObject
> </FilesMatch>
> <FilesMatch "*\.epl>
> SetHandler perl-script
> PerlHandler HTML::Embperl
> </FilesMatch>
> etc. etc.
> --
> ___cliff rayman___www.genwax.com___cliff@genwax.com___
RE: Question about HTML::EmbperlObject [ In reply to ]
> already tried this, Cliff :
>
> Syntax error on line 36 of /usr/local/agora/conf/agora.conf:
> <FilesMatch> cannot occur within <Location> section
>

Files or FilesMatch can only occur inside a Directory Block, _not_ inside a
Location block (see Apache docs, and you should read and understand
http://www.apache.org/docs/sections.html. That's very very helpfull in
solving such issuse)

> and somethink like <FILESMATCH "/myDirectory/.*\.epl$">
> doesn't work for HTML::EmbperlObject...
>

It's called FilesMatch, not DirectoryMatch, so it looks only for the
Filepart. You may write

<Directory /full/path/to/myDirecory>
<Files *.epl>

# here your config directives

</File>
</Diretory>


> did you try it before to answer ? :-)
>
> i tried to read the source code from Gerald Richter, but don't
> understand why
> this doesn't work - it seems EMBPERL_OBJECT_BASE *must* be in a <Location
> ...> tag.
>

No, there is no reason that it must inside a Location block.

> And with the following configuration :
>
> <FILES ".epl">
> SetHandler perl-script
> PerlHandler HTML::Embperl
> </FILES>
> <FILES ".fpl">
> PerlHandler Apache::Registry
> AddHandler perl-script .fpl
> PerlSendHeader off
> </FILES>
> <FILES ".cgi">
> AddHandler cgi-script .cgi
> </FILES>
> <Location /freebank>
> PerlSetEnv EMBPERL_OBJECT_BASE _base.html
> PerlSetEnv EMBPERL_FILESMATCH "\.htm.?"
> AddHandler perl-script .html
> PerlHandler HTML::EmbperlObject
> ...
>
> *.fpl (mod_perl) doen't work (of course, no Handler), and
> *.cgi (standard CGI) and *.epl (Empperl) are not taken as
> EmbperlObject (of
> course, but they work now...)
>

Try (sorry I don't tried it, but it should work)

# plain Embperl
<FILES *.epl>
SetHandler perl-script
PerlHandler HTML::Embperl
Options ExecCGI
</FILES>

# registry
<FILES *.fpl>
PerlHandler Apache::Registry
SetHandler perl-script
PerlSendHeader off
Options ExecCGI
</FILES>


# Cgi scripts
<FILES *.cgi>
SetHandler cgi-script
Options ExecCGI
</FILES>

# opl Files handelt by EmbperlObject
<FILES *.opl>
PerlSetEnv EMBPERL_OBJECT_BASE _base.html
PerlSetEnv EMBPERL_FILESMATCH "\.opl"
SetHandler perl-script
PerlHandler HTML::EmbperlObject
Options ExecCGI
</FILES>

Gerald

P.S. I am out of office for the next 5 days, so I will not be able to answer
any mail before friday

-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------