tags:

views:

98

answers:

4

I am running with Perl 5.10.1 installed using the package manager. I have successfully installed Moose from the CPAN shell, and I have tried to install the MooseX::Declare extention without success.. Here is what I have done:

$ sudo cpan > cpan.log
cpan[1]> install MooseX::Declare

Cannot determine perl version info from lib/MooseX/Declare.pm

Warning: prerequisite Devel::Declare 0.005011 not found.

Warning: prerequisite MooseX::Method::Signatures 0.30 not found.

This is what appears in the terminal at first before the installation lauches, I have posted the 'cpan.log' file here.

Now, I have tried installing the two prereqs above, the latter depends on the first one. But installing the first one gives me this:

cpan[6]> install Devel::Declare

 Running install for module 'Devel::Declare'

Running make for F/FL/FLORA/Devel-Declare-0.006000.tar.gz

Has already been unwrapped into directory /home/jfb/.cpan/build/Devel-Declare-0.006000-6qeuWN

'/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512, won't make

Running make test

Make had some problems, won't test

Running make install

Make had some problems, won't install

A: 

It would appear that MooseX::Declare does not list the module named aliased as a dependency, while using it. Try install aliased from the CPAN shell, then try installing MooseX::Declare again.

Grrrr
I've sent a pull request to the author to get the dependency list updated. But FWIW, you almost certainly had some install failures before this point, as many other things require this module.
Ether
@Ether: How many is "many"? Without doing any sort of comprehensive analysis, and just going by what I have installed on a couple of my boxes here ("a lot"), I can see a bunch of Catalyst modules, as well as `MooseX-Role-WithOverloading`, that's all.
Grrrr
Grrrr: some things MooseX::Declare depends on also depend on `aliased`, for example Parse::Method::Signatures and MooseX::Method::Signatures. I am hoping Kaeso sends his install logs.
Ether
vanilla CPAN.pm sometimes refuses to give up when it should, which means that one module fails, and then you get another three or four modules that depended on it also failing and cluttering up the log. Very frustrating.
hobbs
I seem to have the aliased installed and updated allready:cpan[2]> install aliased /aliased is up to date (0.30).
Kaeso
A: 

I had similar problems a few days ago, on OS X. In my case, either MooseX::Method::Signatures or MooseX::Declare depended on B::Hooks::OP::Check. Once I installed that, all problems went away.

Pedro Silva
@Pedro: did you report this issue?
Ether
No I didn't. I attributed to problem to OS X, since I've never had any issues on Linux. But now, seeing this post, there might something to it, if course. I'd be helpful to know if the poster is also on OS X.
Pedro Silva
Nope, ubuntu 10.04
Kaeso
A: 

I have resolved this issue, with good advice from Ether. What happened is that the YAML prerequesite was not installed/not installed properly. What I did is to start over by deleting the build folder and reinstalling:

$ sudo rm /home/jfb/.cpan/build -rf
$ sudo cpan > cpan.log
cpan[1]> install YAML
cpan[2]> install MooseX::Declare

Now everything seems to work, see the log file here.

Kaeso
Do not run `sudo cpan` because the tests will run with superuser privileges. This is a bad thing. Instead, setup [`make_install_make_command` and `mbuild_install_build_command`](http://p3rl.org/CPAN#Config_Variables) so the privileges are only elevated for the time when they are really needed: for installing into a system location.
daxim