If you intend to embed modules into your application, your application can
use lib to find them in your own private library directory (a part of your application). After
use lib, perl will see the updated value of
@INC in its search for subsequent
use statements.
BEGIN { $INSTALLDIR = my_fun_to_find_my_own_install_dir() }
use lib "$INSTALLDIR/privatelib";
use Acme::SuperModule qw(whatever);
The upside is that you have some control over the versions that folks will use, and thus you can more easily guarantee proper execution. The downside to this approach is that the writer of that embedded module (e.g., Acme::SuperModule) might fix a critical bug, and your customers won't get the benefits until you ship them a new version.
--
[ e d @ h a l l e y . c c ]