1

I tried using CPAN module XML::Writer, but I am getting following error:

Can't locate XML/Writer.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at testing.pl line 3.
BEGIN failed--compilation aborted at testing.pl line 3.

I checked for installation of the module using - perldoc XML::Writer and the document doesn't seems to be exist. As I don't have the privilege to install the package as I am not the system administrator.

I have similar error for DBD::CSV too.

What can be done if a particular CPAN module not available/installed in the server where I am working and how do I install it without admin access?

vkk05
  • 3,137
  • 11
  • 25
Dhanashri P
  • 111
  • 5
  • 1
    See also [Installing PERL CPAN modules in local directory](https://stackoverflow.com/q/7072101/2173773), [Install CPAN Modules without messing up the system Perl installation](https://stackoverflow.com/q/7072101/2173773), [How can I install a CPAN module into a local directory?](https://stackoverflow.com/q/540640/2173773) – Håkon Hægland Jun 24 '20 at 07:11
  • 1
    No special permissions are needed to install a module. That said, I find it better to install all of `perl` into my home directory rather than just modules. Far simpler in the long run. You can use `perlbrew` to install `perl` (Google `perlbrew` and follow the simple instructions), then just do `cpan XML::Writer DBD::CSV` – ikegami Jun 25 '20 at 17:50

1 Answers1

0

Just an idea. I can't write this as an comment, because I'm a new user here and have not enough reputation to do this.

You can download the module files as XML-Writer-0.625.tar.gz from CPAN website https://metacpan.org/pod/XML::Writer and extract it in the same folder as your perl file.

newuser
  • 53
  • 7