Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

How to automatically install all modules required by a script from CPAN?

$
0
0
Having a script.pl how can I automatically download from CPAN all required modules and install and update as required? Something like "emerge -uDNav world" for the perl?

---------- Post updated at 05:38 PM ---------- Previous update was at 05:28 PM ----------

Doesn't matter I've found it

Code:

cat *.pl  | grep "^use " | tr ';' ' ' | while read a b c; do echo $b; done | sort -iu | while read a; do cpan $a; done

Viewing all articles
Browse latest Browse all 16232

Trending Articles