I have a perl script (MyTest.pl) that includes (use) two modules (MyA.pm and MyB.pm). The problem I have is that module A also have to include Module B, but this doesn't seem to work as is already has been included in the .pl file.
MyTest.pl
use MyA;
use MyB;
print hello(); # defined in MyB
MyA.pm
use MyB;
print hello(); # defined in MyB
perl states that the subroutine hello is undefined when called from MyA.pm. From what I can grasp it seems like the use only works where it is used (ha!) the first time.
Any clues?