Is there really no way to force Embperl to Execute the (*) part first?
Surely this would make sense for most applications and would make things a lot
simpler. Also it would make it easier to port from plain CGI?
Nico
On Wed, May 02, 2001 at 05:33:46AM +0200, Gerald Richter wrote:
>
>
> > Thanks for the quick reply.
> > But unfortunately after looking at the example I still do not know how i
> could solve my problem. Maybe I didn't describe it very well.
> > I am calling a module function in login.html that checks user name and
> password and sets the global $user_id. Problem is that the status.html is
> executed before login.html and is therefore displaying an old value. I do
> not understand how I could solve this by using method calls.
> >
>
> Your files (that are invoked via Execute ('*') ), defines a method, for
> example getstatus, this method returns what ever information is needed, your
> status page now can call this method, also the actual file isn't executed so
> far:
>
> status.epl:
>
> [-
> $r = shift ; # get EMbperl request object
> $status = $r -> getstatus ; # retrived status of current page
> -]
>
> in your page:
>
> [!
> sub getstatus
> {
> return "What ever you want" ;
> }
> !]
>
> You may define a default implementation, in your base template, that is
> called when the actual page doesn't define a getstatus method:
>
> [!
> sub getstatus
> {
> return "unknown" ;
> }
> !]
>
> Is this more clear now, or is this not what you need ?
>
> 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 925131
> WWW: http://www.ecos.de Fax: +49 6133 925152
> -------------------------------------------------------------
>
>
> > Nico
> >
> > >>
> > >> Is there a way to force Embperl to execute the * portion first? How
> have others solved this problem?
> > >>
> > >
> > >You can use method calls to solve this problem. Look at the example in
> the EMbperlObject documenation:
> > >
> >
> >http://perl.apache.org/embperl/EmbperlObject.pod.5.html#Example_for_using_m
> ethod_calls
> > >
> > >This example shows different things. The piece that apply to your
> problem, is how the title is build. The actual file defines a method title,
> that could be call _before_ the Execute ('*')
> > >
> > >Hope this helps
> > >
> > >Gerald
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]