software install problem perl module

Avi Greenbury lists at avi.co
Tue Feb 21 23:32:13 UTC 2012


CJ Tres wrote:

> Attempting to install a software I get an error that the maintainer 
> tells me indicates that "it needs the Perl module 'Std::Class'"
> 
> Googling I found nothing helpful, at least as near as I can tell not 
> being a programmer.
> Anyone have a clue?
> 

If I do

apt-cache search perl std class

In the results is:

libclass-std-perl - Support for creating standard "inside-out" classes

Which is probably what you want. For CPAN modules in the repositories,
generally you find they take the name of the module on CPAN:

   Std::Class

Make it all lower-case:

  std::class

Replace any double-colons with a hyphen:

  std-class

then put it between 'lib' and '-perl':

  libstd-class-std-perl

So, for another (and very contrived) example, what's known on CPAN as
Syntax::Highlight::Engine::Simple
is called
libsyntax-highlight-engine-simple-perl 
in apt.

There is a more general discussion as to whether you should be using
Perl modules from apt or by installing them with the CPAN installer
(or, better, cpanminus). Generally, if you're using the system Perl
(that is, the Perl that came with the OS) you're better off sticking to
the apt-supplied modules unless the one you want isn't available.

If you get into using exotic modules, you'll probably want to install
your own Perl and maintain a separate installation of CPAN modules for
it. Much of dpkg and other system tools make use of Perl, so it's best
to not modify it too far from stock,

-- 
Avi

-- 
Avi




More information about the ubuntu-users mailing list