in reply to How can I programmatically install a module from file.

While it's not the answer to the question you asked, per se, on the topic of offline installation of perl modules, CPAN can take a file: URL for offline installation. The catch is that the distributions must be in directories structured like CPAN and with the kind of index that CPAN uses.

For that, you might want to explore CPAN::Mini, which gives you a local mirror of a subset of CPAN which is fairly compact (e.g. CD-ROM or USB-key sized). CPAN::Mini::Inject allows you to add your own distributions to that mirror if you need them.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.