-
1
- #1
I had this problem before so it might be useful for someone
package Global;
use strict;
require Exporter;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(A B);
use constant A => "A";
use constant B => "B";
1;
within the caller one use "Global::A"... e.g. $a = Global::A
so now u can share constant among many modules
package Global;
use strict;
require Exporter;
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(A B);
use constant A => "A";
use constant B => "B";
1;
within the caller one use "Global::A"... e.g. $a = Global::A
so now u can share constant among many modules