How to install CPAN modules on mageia 4 [duplicate] - perl

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 8 years ago.
How to install CPAN modules on mageia 4? I am struggling to find out to achieve this.
any help is appreciated..

First you probably don't need to, just install the package.
For example perl-WWW-Mechanize is the one for WWW::Mechanize.
You should use rpmdrake or urpmi to find the package providing the module you want.
$ urpmf --provides --literal 'perl(WWW::Mechanize)'
perl-WWW-Mechanize:perl(WWW::Mechanize)[== 1.730.0]
If you want to be able to use the cpan command, you need to install perl-devel package.

Related

Undefined subroutine &URL [duplicate]

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 3 years ago.
I am running perl script to check whether the IP is present or not. I am getting the error in script.
Perl script: I used
use URL::Encode;
library, but it threw the below error:
Can't locate URL/Encode.pm in #INC (#INC contains: C:\Strawberry\perl\lib\CPAN C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .)
So I used direct path as below:
use lib 'C:\Strawberry\perl\lib\CPAN';
my $json_hash={};
$json_hash->{'username'}=$username;
$json_hash->{'response'}=$response;
$json_hash->{'control'}=$control;
my $json_query=URL::Encode::url_encode(JSON::to_json($json_hash));
Suggest me any alternate library or a way to use this library
The code you posted doesn't result in the error you are getting. Your program surely has use URL::Encode; or similar.
There's no point in adding a path to #INC that's already in #INC, so your solution is useless.
The correct fix is to install the missing modules.
You're using an older version of Perl. You might want to consider upgrading. (The message in question has been updated to include the useful hint that you may need need to install the module.)

What is the difference between cpan/cpanm and cpm? [duplicate]

This question already has answers here:
Which cpan installer is the right one? (CPAN.pm/CPANPLUS/cpanminus)
(5 answers)
Closed 4 years ago.
What is the difference between the cpan/cpanm and cpm commands?
I'm perl-begginer. What I can use: cpan/cpanm or cpm? Thanks.
These are all different programs that essentially do the same thing. They install modules from the CPAN (Comprehensive Perl Archive Network) to your computer.
cpan is the utility that Perl brings to install modules. It can be used as a shell or a simple command line utility. It uses the module CPAN under the hood.
cpanp is the utility to use the CPANPLUS module. It also has an integrated shell, and in general is a bit faster than the classic cpan tool.
cpanm is a faster, less fully-featured CPAN client that comes with the App::cpanminus distribution. It does not have a shell, and is the de-facto standard today, as most people recommend using it. It's fast, easy to use and usually you don't have to care about what is happening behind the scenes. There's also the handy cpanm-reporter in a separate distribution, that you can use to send test reports of your installations to cpantesters.org, which will then show up on metaCPAN and in other places, so other people know whether a certain dist will work with their OS and Perl version.
cpm is yet another client to install modules from CPAN. It's relatively new and claims to be very fast. It uses Menlo under the hood, which is the new backend the author of cpanm is working on to replace the internals of that one. It does not have a shell.
If all you want to do is install modules, it really doesn't matter what you use. cpan will always be available, but once you're used to cpanm it starts feeling a bit tedious.
I suggest you use whatever you feel comfortable with.

How to fix "Can't locate Archive/Tar.pm" [duplicate]

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 5 years ago.
I'm trying update a software and when I running for make update I've a issue:
Can't locate Archive/Tar.pm in #INC (#INC contains: ...)
How I can fix this?
Archive::Tar has been bundled with Perl since Perl 5.10, so unless you are using an ancient version of Perl, you have a partial or corrupted install of Perl.
Some Linux distributions (e.g. Redhat) gut out lesser-used parts of Perl and provide them in an package (e.g. perl-core) that can be installed using the OS distribution's package manager.
Alternatively, Archive::Tar is available for install separately from Perl —it is "dual-lived"— so you can install it from CPAN.

Why can't I install the Perl PAR::Packer module? [duplicate]

This question already has answers here:
How to install pp (PAR Packager)?
(6 answers)
Closed 8 years ago.
I am trying to convert my perl scripts into executable files for Windows. The executable file should include all modules, too.
I am trying to install PAR Packer using ppm but I get an error message :
"ppm install failed: Can't find any package that provides PAR::Packer"
code:
ppm install PAR::Packer
How to make pp work which is present in PAR::Packer?
Else, is there any other module / free software to convert Perl to exe?
It looks to me that there is no PPM package for PAR::Packer.
You're using ActivePerl which makes its own PPM packages which are a subset of the full range of CPAN modules available.
See this answer for more: How to install pp (PAR Packager)?
I found that using CPAN alone was not enough to get PAR::Packer installed on my version of Perl (Perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread) on Windows 7. To get the module installed I first had to install Win32::Exe via the ActiveState PPM, then switch and install the PAR::Packer module with CPAN.

Read pdf in perl CAM::PDF [duplicate]

This question already has answers here:
What's the easiest way to install a missing Perl module?
(24 answers)
Closed 9 years ago.
I want to install perl module CAM::PDF for Linux. Can somebody please suggest that how can this be done? I was unable to find any place where I could download this module from.
I was unable to find any place where I could download this module from
HOW???
This module available on CPAN.
Try cpanp install CAM-PDF