Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Looking for assistance using Perl packages

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
C5 Hardtop
Posts: 11
Joined: 2014-06-08 18:07
Location: Washington State

Looking for assistance using Perl packages

#1 Post by C5 Hardtop »

I've been converting myself to Debian from Windows and need some guidance with Perl packages. I keep wasting time trying to install packages. Sometimes it works, sometimes not. Right now, I can't run my database scripts that I could run yesterday. Specifically Pg.pm can't be found. I had installed apache2 via apt-get since using the db perl scripts that depend on DBI::Pg, but that is all. I use cpan to install Perl packages.

Starting out as a new Debian user, what should I be doing to install a package, keep Perl working and what should I not do to keep Perl working? For clarity, I'm not looking for help on this one specific issue that is blocking me now as I've had many problems previously. I'm looking for assistance along the lines of principals such as "don't install active state or ppm, use what is installed with Debian to avoid incompatibilities. Debian provides Perl as part of its install and use cpan to install packages".

I'm looking forward to your responses.

fsmithred
Posts: 1873
Joined: 2008-01-02 14:52

Re: Looking for assistance using Perl packages

#2 Post by fsmithred »

I'm far from expert on this, but you might have better luck if you don't use cpan to install perl modules. Instead, find and install the debian package for that module. Run 'aptitude search <module>' to find the name of the package you want. (Or search for the name in synaptic.)

For example, if I wanted HTTP::proxy, I'd run 'aptitude search http-proxy' and I'd see that the package is named libhttp-proxy-perl.

If you want to find what package contains a specific file, install apt-file, run apt-file update, and then you can search for a package that contains the file you want, or you can list all the files in a particular package. For example, 'apt-file find Pg.pm' returns a list of package names followed by the full path of the file. Here's a partial copy of that list:

Code: Select all

libanyevent-dbd-pg-perl: /usr/share/perl5/AnyEvent/DBD/Pg.pm
libbio-perl-perl: /usr/share/perl5/Bio/DB/SeqFeature/Store/DBI/Pg.pm
libclass-dbi-loader-perl: /usr/share/perl5/Class/DBI/Loader/Pg.pm
libclass-dbi-pg-perl: /usr/share/perl5/Class/DBI/Pg.pm
libdata-objectdriver-perl: /usr/share/perl5/Data/ObjectDriver/Driver/DBD/Pg.pm

User avatar
pmu
Posts: 18
Joined: 2014-01-13 09:38

Re: Looking for assistance using Perl packages

#3 Post by pmu »

Hi,

Sorry for the delayed reply, but you can try perlbrew - http://perlbrew.pl/

This will allow you to install various perl versions right inside your home directory.

This ways, you leave the "system perl" alone and do all your work in a sort of your "personal copy" of Perl.

Additionally, try using cpanm. It will make installing modules easy.
If you are ok with installing modules for the "system perl" (the Perl that was shipped along with Debian) Try the package manager. It's the easiest way to install modules. It takes care of the dependencies as well.
Debian Wheezy XFCE - Thinkpad T430 - i5 III Gen - 16 GB RAM
-----------------------------------------------------------------------------------
Perspectum cognitio aeterna

Post Reply