Context

MyModule.pm
#!/usr/bin/perl -w use strict; package MyModule; use Exporter; our @ISA = qw( Exporter ); our @EXPORT = qw( MyFunc ); # ... some other subs go here ... [1] sub MyFunc { return 'Oh yeah!'; } # ... some other subs go here ... [2] 1; }
[download]
SomeOOModule.pm
#!/usr/bin/perl -w use strict; use MyModule; # try 1 { package SomeOOModule; use MyModule; # try 2 # ... some other subs go here ... [3] sub GetFuncy { warn '------ ' . __PACKAGE__ . " ------\n"; #warns "------ SomeOOModule ------" use MyModule; # try 3 return MyFunc; } # ... some other subs go here ... [4] }
[download]
MyProgram.pl
#!/usr/bin/perl -w use strict; print SomeOOModule::GetFuncy();
[download]

Question

When might this `use MyModule;` not import MyFunc into SomeOOModule::?

Answers

Extra Credit

Point out where a deviation from the code given might create a different reason for this problem to occur.