LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Print output of a script to screen using Perl/Multiple installation of Perl Modules (http://www.linuxquestions.org/questions/linux-general-1/print-output-of-a-script-to-screen-using-perl-multiple-installation-of-perl-modules-863337/)

metallica1973 02-17-2011 10:22 AM

Print output of a script to screen using Perl/Multiple installation of Perl Modules
 
I have been using a tool called CPANPLUS and trying to install multiple perl modules via this script file containing the modules I want installed. It worked once and then second time I ran it, it didnt work. When it executes, it doesn’t complete and I want to see the output from the script to the screen as it executes so I can see what is going on. I am new to programming to show mercy. I will break out the old perl and c books later on. thanks

This is what I do:

perl multi_module.pl ---> nothing happens

This is what is inside

PHP Code:

   #!/usr/bin/perl -w
    
use CPANPLUS;
    use 
strict;

    
CPANPLUS::Backend->newconf => { prereqs => } )->install(
        
modules => [ qw(
            
DBI
            DBIx
::Simple
            DBD
::SQLite
            LWP
            WWW
::Mechanize
            String
::CRC32
            Digest
::MD4
            Crypt
::Password
            Digest
::CRC
            Digest
::HMAC
            IO
::Pty
        
) ]
    ); 

Also is there other methods in installing multiple Perl modules at the same time. It can be tedious and I want an easy method.Installing them one a time sucks.

I also read about autobundle

http://www.ibm.com/developerworks/op...l-depperl.html


Is this what I need?


metallica1973 02-17-2011 05:59 PM

I figured it out:

PHP Code:

 #!/usr/bin/perl -w 
    
use CPANPLUS
    use 
strict

  print 
"  CPANPLUS::Backend->new( conf => { prereqs => 1 } )->install( "
        
modules => [ qw
            
DBI 
            DBIx
::Simple 
            DBD
::SQLite 
            LWP 
            WWW
::Mechanize 
            String
::CRC32 
            Digest
::MD4 
            Crypt
::Password 
            Digest
::CRC 
            Digest
::HMAC 
            IO
::Pty 
        
) ] 
    ); 



All times are GMT -5. The time now is 05:16 AM.