in reply to EXPORT_OKed function refusing to import
I presume you use use MyNameSpace::Faction ...; in Player and use MyNameSpace::Player ...; in Faction? If so, something I previously wrote should help you.
If ModA uses ModB, ModB uses ModA, and ModA or ModB exports symbols, one needs to pay attention to code execution order. The best way I've found to avoid problems is to do:
# ModA.pm use strict; use warnings; package ModA; BEGIN { our @ISA = qw( ... ); our @EXPORT_OK = qw( ... ); require Exporter; *import = \&Exporter::import; } use This; use ModB; use That; ... 1;# ModB.pm use strict; use warnings; package ModB; BEGIN { our @ISA = qw( ... ); our @EXPORT_OK = qw( ... ); require Exporter; *import = \&Exporter::import; } use This; use ModA; use That; ... 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: EXPORT_OKed function refusing to import
by dsheroh (Monsignor) on Feb 06, 2007 at 20:40 UTC | |
by ikegami (Patriarch) on Feb 06, 2007 at 20:43 UTC |