LanX: After useing test_v1.pm you have to make Perl believe that package Foo and package Foo::Bar have already been loaded ...
That makes only sense if you want to prevent Foo/Bar.pm being read from disk if a use Foo::Bar; is executed after the usurping module test_v1.pm has been loaded. Depending on load order can be tricky if Foo/Bar.pm initializes stuff or runs BEGIN blocks.
Unfortunately we don't know the intentions of the original poster, so apparently the lot of us have made different assumptions. I have seen (and used) multiple packages in one module in these cases:
Cheers,
haj
In reply to Re^2: Multiple Packages in a Module? (%INC)
by haj
in thread Multiple Packages in a Module?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |