in reply to Spliting own program distribution intoi several modules.

One way would be to add your private module path before the CPAN module path in @INC so that Perl will prefer local module installations over installations from CPAN:

BEGIN { my $private_module_path = '/usr/local/myscript/lib'; unshift @INC, $private_module_path; }; use Net::MyModule; # will pick up the first Net/MyModule.pm that is fo +und in @INC

An alternative approach would be to load both modules and then try to find out which one has the largert version number, but that is a hairy thing to try and a user who does local modifications might not think of bumping the version number high enough.