perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MaurĂ­cio Amorim " <masil...@terra.com.br>
Subject Question about Exported symbols
Date Mon, 10 Feb 2003 01:39:54 GMT
Hi list,
 
I have two modules with cross dependency.
Some of type:
 
package p1;
BEGIN {
        use Exporter ();
 
        our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
 
        # set the version for version checking
        $VERSION     = 1.00;
 
        @ISA         = qw(Exporter);
        @EXPORT      = qw(f1 f2);
        %EXPORT_TAGS = ( );     # eg: TAG => [ qw!name1 name2! ],
 
        # your exported package globals go here,
        # as well as any optionally exported functions
        @EXPORT_OK   = qw();
};
use p2;
.
.
1;
------------
 
package p2;
BEGIN {
.
.
.
};
use p1;
.
.
1;
 
I am having some problems about undefined subroutine when the use is before the BEGIN clause.
Any body know because it occurr ? 
I can always export symbols before use modules, same when the export is inside of BEGIN clause
?
 
When the use is how showed above,  the error not occurr.
I am exporting many symbols with @EXPORT.
Any body suggest an better use of this situation ?
 
 
Thank you. Mauricio
 
 
 
 
 
 
Mime
View raw message