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 2001/04/05 07:36:52 UTC

Re: import of symbols in Embperl pages (was: DBI in Embperl)

>I'm use my module which work with DBI.
>I exproted functions in the header this module.
>Second page which I make Exec({inputfile => "email.epl"}) don't see
>functions from my module but this functions I use in first file which
>make Exec.
>I try include my module in both epl files and divide.
>

Every Embperl page runs in it's own package, to have separate namespaces to
avoid collision of variables names. So you have to import the symbols your
module export in both pages, i.e. write the

[! use mymodule ; !]

in every page you want to have these symbols available.

Gerald

P.S. Another solution would to force the same package name of both pages by
using

Execute ({inputfile => 'email.epl', package => __PACKAGE__}) ;




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