I really also recommend EmbperlObject for your rewrite. To get a starting
point take a look at

http://perl.apache.org/embperl/pod/intro/IntroEmbperlObject.htm

and

http://www.ecos.de/embperl/pod/intro/IntroEmbperl2.htm

Gerald

P.S. isa let you inherit methods from a base class defined in a epl file

--------------------------------------------------------------
Gerald Richter     ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
--------------------------------------------------------------
|
|   ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
|
+-------------------------------------------------------------

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 17, 2003 6:03 PM
Subject: Re: Execute without __PACKAGE__


> Luis Fernando:
>
> Thank you for your help, i will check embpelr::object.
>
> I have an additional question:
> What is the "isa" parameter and how can i use it?, i did not see it in the
> embperl documentation in the site http://perl.apache.org/embperl
>
> Thank you
>
> Carlos Kassab
>
> > On Mon, 2003-06-16 at 17:02, [EMAIL PROTECTED] wrote:
> >> Hi all:
> >>
> >>
> >> Eplsite(www.eplsite.org) is a good system to run as CGI but when
> >> running with mod_perl it will consume memory because it is using
> >> Execute with __PACKAGE__
> >>
> >> The main file is called index.epl and it is executing some files
> >> containing
> >>  subs, when i try to change the way to execute files like this:
> >>
> >> [- Execute ({inputfile => 'mainprogram.epl', import => 1 }); -]
> >> [- Execute ($theeplsitepath.'skins/'.$skin.'/colors.epl'); -]
> >> [- Execute ({inputfile => $theeplsitepath.'includes/subs.epl', import
> >> => 1}); -]
> >>
> >>
> >> and then i execute :
> >>
> >> Execute ({inputfile =>'modules/'.$main_module.'/news_module.epl'});
> >>
> >> And now i try to call the subroutine theheader(contained int
> >> mainprogram.epl) from news_module.epl
> >>
> >> i allways get an error message " subroutine theheader not declared ".
> >>
> >
> > I suggest you to take a look at EmbperlObject, it would be a cleaner
> > and better solution.
> >
> > Functions declared in your "base.epl", for example, are accessible
> > trough the $req object as methods, example:
> >
> > In base.epl
> >
> > [$ sub test $]
> >  [-
> >  # some code
> >  -]
> >  [+ $output +]
> > [$ endsub $]
> >
> > [!
> > sub other_sub {
> >  # common perl sub
> > }
> > !]
> >
> > [- Execute('heder.epl'); -]
> > [- Execute('*'); -]
> > [- Execute('footer.epl'); -]
> >
> > In your pages:
> > [-
> > $req = shift;
> > $req->test;
> > $req->other_sub;
> > -]
> >
> > Or you can put all your subs in a shared file and use the "isa"
> > parameter to Execute.
> >
> > Regards,
> >
> > --
> > Luiz Fernando Ribeiro
> > Engenho Soluções S/C Ltda
> >
> >
> > ---------------------------------------------------------------------
> > 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]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to