|No such thing as a small change|
If you're looking to avoid the overhead of loading all the submodules in y.pm but still having access to the code of y.pm proper, you could consider refactoring so that the big load/export is visible as y, but the actual code of y.pm occurs in y/actual.pm
Then in y.pm
This would leave y.pm with the same public interface, but give you the option of a leaner y::actual or y::tiny or y::whatever available. This will only work of course, if the code in y.pm doesn't itself depend on those submodules.
You could also look at autoloading and/or custom import subroutines
If you're just woried about namespace polution, s/use/require/
In reply to Re^3: How to declare globally visible subroutine like built-in ones ? Is it possible?
by Anonymous Monk