Doesn't mcpani call CPAN::Inject when you do "mcpani --inject"? Looking over CPAN::Inject there really isn't much to it (it just updates the necessary files). Are you saying to write your own code based on CPAN::Inject?
The initial use this module was created for was to inject tarballs into the CPAN sources directory for the reserved LOCAL user, so that they can be installed via the CPAN shell, with automated recursion to CPAN dependencies.
Seems to be just as you requested.
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
Right and I was using this through the mcpani tool which just calls it. I think the issues were less with the API call (which doesn't do too much) and more with the tools that use the calls as well as some of the fine details.
The issue I had was not having to mirror CPAN, which seemed to be part and parcel of how the tools operated and every tutorial on the subject. I figured out how to get around this (note my prev response in this thread).
There is a remaining issue which is cpanp needs the version number to do the install and it isn't clear why this is.