You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gavin Carr <ga...@openfusion.com.au> on 2001/11/01 03:58:30 UTC

Re: Any way to allow only 'partial' inheritance

Hi Sean,

Something I've found useful in vaguely similar situations is to do your
base.epl Execute with an 'output' argument, which stuffs it all into a
scalar for you instead of outputting it directly. You can then check
whether the include is a full html page or just a fragment and munge
appropriately either way.

Cheers,
Gavin

On Wed, Oct 31, 2001 at 05:17:16PM +0000, Sean Ahern wrote:
> Greetings,
> 
> 	I'm about to implement a small intranet-type project that I've already 
> testbedded with Apache/Embperl.  I'm much of a lighweight dabbler in 
> Perl, but there's nothing amazingly complex required at the moment.  The 
> Embperl code already does most of what it needs to do at the moment, but 
> now I want to implement the whole thing properly, with a clean 
> separation of server-side logic, client-side logic, content and 
> presentation.  Which, as far as I can tell means breaking it down into 
> inheritable chunks and using Execute a lot!
> 	-However- many of the documents will come from someone else who is 
> writing them in Dreamweaver, and will be full, standalone HTML pages. 
> And they may -need- to stay standalone, and by that I mean they will 
> with their own HTML, HEAD, and BODY tags.
> 	Now obviously, if my base document has its own HTML, HEAD, BODY sections, 
> if I inherit a document which possibly has its own HTML,HEAD, BODY 
> sections, I will probably wind up with malformed HTML.
> 	Structurally, I want my intended information folders to grouped by 
> content category, again for other people to add to.  Hence I dont want 
> my folder-based inheritance to get overly complex.
>   	What I'd -like- to be able to do is only inheret the part of those 
> documents that resides in the BODY section.  Is that possible, with a 
> minimal amount of Perl/Embperl voodoo, or do I need to rethink my approach?
> 
> 	My thanks for your time.
> 
> 			Sean Ahern
> 
> -- 
> ----------------------------------------------------------
> Sean Ahern,
> Computing Support Officer,
> School of Television and Imaging,
> Duncan of Jordanstone College,
> Dundee                                   0044(0)1382-345372
> -----------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Any way to allow only 'partial' inheritance

Posted by Gerald Richter <ri...@ecos.de>.
>
> Something I've found useful in vaguely similar situations is to do your
> base.epl Execute with an 'output' argument, which stuffs it all into a
> scalar for you instead of outputting it directly. You can then check
> whether the include is a full html page or just a fragment and munge
> appropriately either way.
>

A second possibility is to put the BODY part inside a [$ sub $] and call
this sub e.g.

<HTML>....
<BODY>
[$sub body$]
.....
[$endsub$]
</BODY>
</HTML>

and call it with

Execute({inputfile => '*', sub => 'body'}) ;

of course that makes it necessary that the designer insert the [$sub$].

Gerald


> Cheers,
> Gavin
>
> On Wed, Oct 31, 2001 at 05:17:16PM +0000, Sean Ahern wrote:
> > Greetings,
> >
> > I'm about to implement a small intranet-type project that I've already
> > testbedded with Apache/Embperl.  I'm much of a lighweight dabbler in
> > Perl, but there's nothing amazingly complex required at the moment.  The
> > Embperl code already does most of what it needs to do at the moment, but
> > now I want to implement the whole thing properly, with a clean
> > separation of server-side logic, client-side logic, content and
> > presentation.  Which, as far as I can tell means breaking it down into
> > inheritable chunks and using Execute a lot!
> > -However- many of the documents will come from someone else who is
> > writing them in Dreamweaver, and will be full, standalone HTML pages.
> > And they may -need- to stay standalone, and by that I mean they will
> > with their own HTML, HEAD, and BODY tags.
> > Now obviously, if my base document has its own HTML, HEAD, BODY
sections,
> > if I inherit a document which possibly has its own HTML,HEAD, BODY
> > sections, I will probably wind up with malformed HTML.
> > Structurally, I want my intended information folders to grouped by
> > content category, again for other people to add to.  Hence I dont want
> > my folder-based inheritance to get overly complex.
> >   What I'd -like- to be able to do is only inheret the part of those
> > documents that resides in the BODY section.  Is that possible, with a
> > minimal amount of Perl/Embperl voodoo, or do I need to rethink my
approach?
> >
> > My thanks for your time.
> >
> > Sean Ahern
> >
> > --
> > ----------------------------------------------------------
> > Sean Ahern,
> > Computing Support Officer,
> > School of Television and Imaging,
> > Duncan of Jordanstone College,
> > Dundee                                   0044(0)1382-345372
> > -----------------------------------------------------------
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>

-------------------------------------------------------------
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 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org