You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2004/05/05 05:49:01 UTC
Re: OO menus
Hi,
>
> [- Execute('../_menu.epl') -]
this simply excutes the code/html in menu.epl
> [- Execute({object => '../_menu.epl'}) -]
this will return you an object, e.g. you can do
[-
$obj = Execute({object => '../_menu.epl'}) ;
$obj -> display_menu(\@menu) ;
-]
if you have defined display_menu as a sub inside of menu.epl
> [- Execute({isa => '../_menu.epl'}) -]
if you ut this in your base.epl, base.epl (and therefore the Embperl request
object) will inheret all methods, so anywhere you can say
[-
$epreq -> display_menu(\@menu) ;
-]
> [- Execute({inputfile => '../_menu.epl'}) -]
this is the same as the first example.
>
> Are there others? Should I put my data into sub routines like is
> shown at times in the docs and the inslut example?
>
> I want to have the html generating code as a widget called in from the
> top-level _base.epl say from _widgets.epl. I would call with the
> subroutine &menu with @menu data structure parameter. The subroutine
> would know how to walk through the structure to print it out.
So you should use the isa solution as shown above.
Gerald
>
> I am speaking in vauge terms because I feel that I can write each
> little piece but I don't quite see how to fit the whole into the
> embperl framework.
>
> Thanks for any thoughts,
---------------------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der KOMCOM 2004 in Mannheim
25. bis 27. Mai 2004 Stand K11a www.komcom.de
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: OO menus
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> Thanks for the responce.
>
> On Wed, May 05, 2004 at 05:49:01AM +0200, Gerald Richter wrote:
>>
>>> [- Execute({object => '../_menu.epl'}) -]
>>
>> this will return you an object, e.g. you can do
>>
>> [-
>> $obj = Execute({object => '../_menu.epl'}) ;
>> $obj -> display_menu(\@menu) ;
>> -]
> In this example, what contructor is called?
> Can I write my own?
>
Everything that is inside [! !] is executed during the 'object => xxx'
initialization. There you can place your construction code or call your
construtor.
Gerald
---------------------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der KOMCOM 2004 in Mannheim
25. bis 27. Mai 2004 Stand K11a www.komcom.de
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: OO menus
Posted by Marco Scoffier <ma...@metm.org>.
Hi Gerald,
Thanks for the responce.
On Wed, May 05, 2004 at 05:49:01AM +0200, Gerald Richter wrote:
>
> > [- Execute({object => '../_menu.epl'}) -]
>
> this will return you an object, e.g. you can do
>
> [-
> $obj = Execute({object => '../_menu.epl'}) ;
> $obj -> display_menu(\@menu) ;
> -]
In this example, what contructor is called?
Can I write my own?
Thanks,
--
Marco
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org