- or download this
package A1;
use A2;
use C;
...
print "In A1: ".C::TYPE->{VEG}."\n";
A2::functionA();
}
- or download this
package A2;
use C;
sub functionA
{
print "In A2: ".C::TYPE->{VEG}."\n";
}
- or download this
package C;
use A2;
use constant {
...
MEAT => 3,
},
};
- or download this
use A2;
A2::functionA(); # prints "In A2: 2"
- or download this
use A1;
A1::functionA(); # prints "In A1: 2\nIn A2: 2"