CPAN cannot install modules locally

CPAN cannot install modules locally

am 23.07.2011 04:07:15 von Alok

--------------030906090903000905040702
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi

I am trying to install MediaWiki::Bot module locally on my server (I am
not the admin).
I am trying to use cpan command line interface for this.

I used following options before beginning installation:
o conf makepl_args "LIBS=-L/home/foo/local/lib
INC=-I/home/foo/local/include PREFIX=/home/foo/local/"
o conf commit

It turned out that MediaWiki::Bot requires bunch of other modules that
cpan tries to install. But I see that many of them fail test cases
because they cannot detect each other. For example,

# Failed test at t/warnings_exist.t line 36.
# got: 'Base class package "Tree::DAG_Node" is empty.'

Or they are getting incorrect version (possibly the one thats installed
in /usr/lib/perl)

#.HTML::Entities version 3.28 required--this is only version 1.35 at
/home/foo/.cpan/build/MediaWiki-Bot-3.4.0-X3wY3E/blib/lib/Me diaWiki/Bot.pm
line 7.

And due to failed test cases cpan does not install anything.

How do I ensure that cpan uses the modules from /home/foo/local ?
Essentially, I want to override the library preference order. I thought
I was doing that using the o conf makepl_args option. But apparently it
is not working.

Any help will be greatly appreciated.

Thanks,
Alok

--------------030906090903000905040702--

Re: CPAN cannot install modules locally

am 23.07.2011 15:36:40 von Shlomi Fish

Hi Alok,

On Fri, 22 Jul 2011 22:07:15 -0400
Alok wrote:

> Hi
>
> I am trying to install MediaWiki::Bot module locally on my server (I am
> not the admin).
> I am trying to use cpan command line interface for this.
>
> I used following options before beginning installation:
> o conf makepl_args "LIBS=-L/home/foo/local/lib
> INC=-I/home/foo/local/include PREFIX=/home/foo/local/"
> o conf commit
>
> It turned out that MediaWiki::Bot requires bunch of other modules that
> cpan tries to install. But I see that many of them fail test cases
> because they cannot detect each other. For example,
>
> # Failed test at t/warnings_exist.t line 36.
> # got: 'Base class package "Tree::DAG_Node" is empty.'
>

That's because they're not in Perl's @INC path.

Please use local::lib for that:

https://metacpan.org/module/local::lib

See:

http://perl-begin.org/topics/cpan/

Regards,

Shlomi Fish

--
------------------------------------------------------------ -----
Shlomi Fish http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html

An original philosopher knows the right combination of ideas to steal.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/