List of CPAN modules that were created but not installed

Is there an easy / clean way to do this in a Linux / Linux-like environment?

purpose

My goal is to run CPAN with admin privileges only during the installation phase and not during the get / make / test phases.

+2


source to share


3 answers


Assuming you're using CPAN.pm for this, I have a few unorthodox suggestions.

Create a subclass of CPAN.pm that actually publishes the results / stages of each module it works with to the registry (via an external callback API to make the registry implementation flexible).



Then you just need to check this registry.

(or you can try putting this as a patch in CPAN.pm itself)

+1


source


CPAN configuration items make_install_make_command

and mbuild_install_build_command

deal with it. Change them to include support sudo

.



+2


source


To document an approach that seems promising but doesn't work - the shell command:

find. -type d -mindepth 1 -maxdepth 1 -print | while read -r DIR; do pushd $ DIR; make -q; mk = $ ?; make -q install; inst = $ ?; make -q test; tst = $ ?; echo Directory "$ DIR $ mk $ inst $ tst"; popd; done | fgrep -ve / build

when run in the cpan build directory, the make -q exit statuses for "," test "and" install "are listed, which says that any work is required to achieve the goal.

But they all have non-zero exit statuses, which means that they will all do something if you executed them, even if make succeeded. So you cannot say that.

0


source







All Articles