Skip navigation.
KDE Developer's Journals

How to install perl modules

coolo's picture

Ever called a perl script and got this?

Can't locate Regexp/Common.pm in @INC (@INC contains: SCRIPT /usr/lib/perl5/5.10.0/i586-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl .) at SCRIPT line 18.

Well, use zypper:

coolo@desdemona#STABLE>sudo zypper in -C 'perl(Regexp::Common)'
Reading installed packages...

The following NEW package is going to be installed:
perl-Regexp-Common

Easy, no?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pgl's picture

... if there's a package available

This only works, of course, if there's actually a package avilable on an enabled repository for the module you want to install. (I found this out recently when I tried to get Number::Format.)

mxttie's picture

thanks for the tip!

thanks for the tip!

mvidner's picture

better example

Most modules follow the convention of packaging Foo::Bar in perl-Foo-Bar, but the above trick is really useful for those that don't:
$ rpm -q --whatprovides 'perl(Locale::gettext)'
perl-gettext-1.05-73

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.