On Mon, 2002-07-15 at 01:40, Angus Lees wrote:
> At Mon, 15 Jul 2002 08:14:32 +0300, variable wrote:
> > I try to display a page title using three embperl files.
> > 
> > ---main.epl---
> > [! sub title {'Website'} !][- $req = shift -]<HTML> <HEAD> <TITLE>[+
> > $req->title +]</TITLE> </HEAD><body>[- Execute('*') -]</body> </HTML>
> > ---
> > 
> > ---first.epl---
> > [- $req = shift -] <HTML> First... [- Execute('second.html ') -]</HTML>
> > ---
> > 
> > ---second.epl---
> > [! sub title {'Second page'} !] [- $req = shift -] <HTML> Final page</HTML>
> > ---
> > 
> > When I access second.epl directly via main.epl then it works fine.
> > But accessing second.epl via main.epl -> first.epl then title is not
> > imported anymore.
> > What am I doing wrong?
> > I'm using Embperl 2.0b8.
>

There is a possible typo in the above first.epl example. You have
Execute('second.html') should that be Execute('second.epl') ?

Aaron

 
> (assuming its all similar to HTML::EmbperlObject 1.3..)
> 
> EmbperlObject sets up the following inheritance:
> 
>       page you requested (aka '*')
>  isa  the _base.epl found (or whatever EMBPERL_OBJECT_BASE is)
>  isa  EMBPERL_OBJECT_HANDLER_CLASS (if set)
>  isa  HTML::Embperl::Req (presumably Embperl::Req in 2.0)
> 
> 
> note that "second.epl" won't feature in that list anywhere, unless it
> was the actual page requested.  going "via first.epl" will never work.
> thus $req->title will get the one in main.epl (assuming thats your
> EMBPERL_OBJECT_BASE).
> 
> if you want to change this inheritance list, you'll need to do so by
> calling Execute({isa => 'second.epl'}) in first.epl somewhere.  see
> Embperl docs (again, i presume this is the same (and working) in
> Embperl 2)
> 
> -- 
>  - Gus
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to