How to install Perl script dependencies?

I am trying to execute a daemon that runs on Perl, and the file is called ffencoderd.pl . Each time I run it, it indicates that the file is missing, for example Can't Locate IO/Scalar.pm .

So, I go to CPAN.org and find the file and install it. The only problem is that I just installed as 6 files and I'm worried there might be 20. Instead of continuing to run ffencoderd.pl and find that I need to install another file, I was wondering if way to update perl . Are these files standard in a properly installed Perl? EX: Config-General-2.50 , Pod-Xhtml-1.61 , libxml-enno-1.02 , etc.

+4
source share
3 answers

Updating Perl will not help you, because the missing modules are not part of the core Perl distribution; they must be installed separately. Tools like cpanm will help you install the modules (given the list of required modules), but they cannot look at the script and figure out which modules it needs. The script author should have done this, but apparently he didnโ€™t. Update: If you say this ffencoderd.pl , the author has listed the necessary modules . You need to install IPC :: ShareLite, Config :: General, SOAP :: Lite, XML :: DOM, XML :: Simple, Pod :: WSDL, Pod :: Xhtml and HTML :: Template.

The easiest way to install this is to install cpanm and then type:

 cpanm IPC::ShareLite Config::General SOAP::Lite XML::DOM XML::Simple Pod::WSDL Pod::Xhtml HTML::Template 

If you did not have a list of modules to install, this question , we will find out what script dependencies are. In my answer you will find a script that uses Module :: ExtractUse to list script dependencies. The only modules you need to install are Module :: ExtractUse and Module :: CoreList (if you don't already have one). You will need to tweak the script a bit for your situation.

+7
source

Perl updates should be done through your maganger package. Installing the perl module from CPAN should be done using the CPAN utility, which is shared with the command, for example, with the perl -MCPAN -e shell command. CPAN will handle package requirements and proper installation.

+2
source

In the documentation you can get a list of the main Perl modules . I do not think that any of the cells you have listed is the key.

There are various utilities that automatically install modules and monitored dependencies. cpan and cpan minus , for example. local :: lib will allow you to install them in a specific directory (which you can add to the PERL5LIB environment variable) if you want to avoid the system (as root).

Note that some modules (such as those using libxml) depend on the non-Perl libraries that will be installed.

If you really want to upgrade Perl, you can look at perlbrew to help you install several versions of Perl installed on the side.

+2
source

All Articles