You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Angus Lees <gu...@inodes.org> on 2005/04/14 01:04:46 UTC
using Embperl::Object from perl
I've been trying to use Embperl::Object offline (from within some
other perl code) and I'm finding it difficult to pass the correct
options.
There is %Embperl::initparam, but this is only good for global
initialisation. I would have expected to also be able to pass any
config option in the relevant constructor or using a method on the
object before it was executed, but that seems not to be the case.
In particular - I can't work out how to create/configure/use an
Application object across multiple requests simply from the perl API
(without going through environment variables and %Embperl::initparam).
There doesn't seem to be any "create a request object from this
application object" method - although the reverse exists
(Embperl::Req::InitRequest(...)->app).
Is this possible currently or should it be considered a feature
request?
--
- Gus
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: using Embperl::Object from perl
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> I've been trying to use Embperl::Object offline (from within
> some other perl code) and I'm finding it difficult to pass
> the correct options.
>
> There is %Embperl::initparam, but this is only good for
> global initialisation. I would have expected to also be able
> to pass any config option in the relevant constructor or
> using a method on the object before it was executed, but that
> seems not to be the case.
>
> In particular - I can't work out how to create/configure/use
> an Application object across multiple requests simply from
> the perl API (without going through environment variables and
> %Embperl::initparam).
> There doesn't seem to be any "create a request object from
> this application object" method - although the reverse exists
> (Embperl::Req::InitRequest(...)->app).
>
> Is this possible currently or should it be considered a
> feature request?
>
At the moment there is no real object orientation interface to
Embperl::Object, there is only one entry point Embperl::Object::Execute. On
the first call it will create the application object and (as long as you
don't give a different appname) will reuse it on subsquent requests. You can
pass all your configuration to Embperl::Object::Execute. The application
configuration will be ignored on the second and any further calls (as long
as appname is the same).
Does this help or you have different needs?
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org