Whilst it is not explicitly stated in the docs, you can specify a file path as the url
for the dependency in a cpanfile
:
requires "Module::Name",
url => "file:///path/to/Module-Name-${VERSION}.tar.gz";
This can prove useful if (for example) you want to test local versions of your own modules and don't have or want a local CPAN mirror.
This only works with carton, not with cpanm --installdeps .