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
cat *.pl | grep "^use " | tr ';' ' ' | while read a b c; do echo $b; done | sort -iu | while read a; do cpan $a; done
# cpan Crypt/OpenSSL/PBKDF2.pm
Going to read '/root/.cpan/Metadata'
Database was generated on Sun, 18 Nov 2012 00:55:04 GMT
Running install for module 'Crypt::OpenSSL::PBKDF2'
Running make for S/SK/SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2-0.02.tar.gz
Checksum for /root/.cpan/sources/authors/id/S/SK/SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2-0.02.tar.gz ok
CPAN.pm: Going to build S/SK/SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2-0.02.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Crypt::OpenSSL::PBKDF2
Writing MYMETA.yml
cp PBKDF2.pm blib/lib/Crypt/OpenSSL/PBKDF2.pm
AutoSplitting blib/lib/Crypt/OpenSSL/PBKDF2.pm (blib/lib/auto/Crypt/OpenSSL/PBKDF2)
/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap typemap PBKDF2.xs > PBKDF2.xsc && mv PBKDF2.xsc PBKDF2.c
Please specify prototyping behavior for PBKDF2.xs (see perlxs manual)
cc -c -I. -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.02\" -DXS_VERSION=\"0.02\" -fPIC "-I/usr/lib/perl/5.14/CORE" PBKDF2.c
PBKDF2.c:67:25: fatal error: openssl/ssl.h: No such file or directory
compilation terminated.
make: *** [PBKDF2.o] Error 1
SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2-0.02.tar.gz
/usr/bin/make -- NOT OK
'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible