You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Ilia Lobsanov <il...@lobsanov.com> on 2002/10/02 23:59:16 UTC
Embperl2.0b8 and Log4perl
I'm using Perl 5.8, mod_perl 1.27, apache 1.3.26, Embperl 2.0b8
I'm trying to export &get_logger in startup.pl ala:
use Log::Log4perl qw(get_logger);
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT : unique = qw(&get_logger);
I want to access &get_logger in an epl, but it's not working unless I use
Log::Log4perl qw(get_logger) in the epl again.
Amy I doing something wrong?
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Embperl2.0b8 and Log4perl
Posted by Gerald Richter <ri...@ecos.de>.
> I'm using Perl 5.8, mod_perl 1.27, apache 1.3.26, Embperl 2.0b8
>
> I'm trying to export &get_logger in startup.pl ala:
>
> use Log::Log4perl qw(get_logger);
>
> use Exporter;
> our @ISA = qw(Exporter);
> our @EXPORT : unique = qw(&get_logger);
>
> I want to access &get_logger in an epl, but it's not working unless I use
> Log::Log4perl qw(get_logger) in the epl again.
> Amy I doing something wrong?
>
No, that's how the things are, because every page runs in it's own
namespace, you have to import (i.e. use) the get_logger into every page by
adding the use on the top
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org