Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using LibXML in perl

Tags:

xml

perl

I'm writing a script that does XML processing. The use is as follows:

use XML::LibXML;

But it doesn't compile:

Can't locate XML/LibXML.pm in @INC

Can anyone tell me which package do I need to install (running ubuntu). libxml2 doesn't do the trick, nor does any of the libxml-*-perl packages.

Or, if possible, is there any better way for simple XML processing?

like image 507
Marek Avatar asked May 14 '11 23:05

Marek


2 Answers

On Debian, it's named libxml-libxml-perl. (Generally speaking, Debian packages of Perl distributions are named "lib".lc($perl_dist_name)."-perl".) I suspect it's the same on Ubuntu, being based on Debian.

libxml2 is the underlying C++ library used by XML::LibXML, not XML::LibXML itself.

like image 77
ikegami Avatar answered Sep 24 '22 17:09

ikegami


There is a command named apt-file.

sudo apt-get install apt-file
apt-file update
apt-file search LibXML.pm

The package you required is libxml-libxml-perl

like image 28
pjincz Avatar answered Sep 24 '22 17:09

pjincz