http://www.perlmonks.org?node_id=402795

This snippet looks on a specified remote site for any modules not found in the local @INC path. Nice for keeping in sync with a central repository.

Note that this method can be applied to any function that returns a filehandle.

In case it isn't obvious, you'll need to change the web site and Remote::Class appropriately before this will work.

Updated: It does not install the module (unlike CPANPLUS, the workhorse behind the Acme module mentioned below), so you do not need privileged access to use this trick. OTOH, you'll download the module each time you run your code.

use LWP::Simple; BEGIN { push @INC, sub { my $URL = "http://remote.site/lib"; my $module = get("$URL/$_[1]") or return undef; open my $fh, '<', \$module or return undef; return $fh; } } use Remote::Class;