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]