How can I install XML::DOM into my perl built from source?

Viewed 167

I downloaded the source to Perl and compiled/installed into a shared directory for my team. By default, Perl doesn't include XML::DOM and I need to add it to the installation. How do I do this?

I tried cpan and it installs to ~/perl5 by default. I tried cpanm next (cpanm -l $install_path XML::DOM) but perl still can't find it in @INC. I'm using perl 5.32.0.

2 Answers

You have env var telling the module's installer to install it in an undesired place.

Unset the following env vars:

  • PERL_MM_OPT
  • PERL_MB_OPT

Don't call any cpan or cpanm, call cpan with your perl or inspect which perl is called with your tool by looking at the header.

/path/to/my/perl -S cpan XML::DOM

Related