Gerald Richter wrote:
>
> > base.epl:
> >
> > [- Execute ('constants.inc') -]
> >
> > [- Execute ('init.inc') -]
> >
> > [- Execute ({ inputfile => 'subs.inc', import => 1 }) -]
> >
>
> As far as I see the import => 1 is the problem. This imports only [$sub$]
> subs but not normal Perl subs.
Ahh, I see.
> If this is the only place where you are importing subs.inc you can add
>
> package => __PACKAGE__
Thanks it works now using that method!
> instead of import, so the subs are compiled in the same package as the
> calling page, then both sorts of sub will work. If you plan to inlcude
> subs.inc in many pages this it is not a good idea to use package, because it
> will cost you a lot of memory, because Perl will create a copy of the subs
> for every import. In this case I would conside moving the subs to a normal
> Perl modul and specifing it with EMBPERL_OBJECT_HANDLER_CLASS.
I'm only calling subs.inc from base.epl, so I should be ok.
Ok, it has to be said again... EmbperlObject rocks!
--
Regards,
Wim Kerkhoff, Software Engineer
Merilus, Inc. -|- http://www.merilus.com
Email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]