Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

New Moose install broke Catalyst::Test

by falseazure (Acolyte)
on Jan 22, 2011 at 18:36 UTC ( #883697=perlquestion: print w/ replies, xml ) Need Help??
falseazure has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, Monks. I am working on my first Catalyst web app and I had it up and running pretty well using the Catalyst::Manual::Tutorial instructions.

Then I got The Definitive Guide to Catalyst which recommends doing an 'install Moose' from cpan. I did this and now all my Catalyst tests fail due to errors I don't understand. Pasting output from first test below:

~/BlankSite$ CATALYST_DEBUG=0 TEST_POD=1 TEST_AUTHOR=1 CATALYST_SERVER +=http://localhost:3000 prove -vwl t t/01browsing.t ......... not ok 1 - use Catalyst::Test; # Failed test 'use Catalyst::Test;' # at t/01browsing.t line 8. # Tried to use 'Catalyst::Test'. # Error: Couldn't load class (Catalyst::Exception::Basic) because +: Can't use an undefined value as a HASH reference at /usr/local/lib/ +perl/5.10.1/MooseX/Role/WithOverloading/Meta/Role/Application.pm line + 45. # Compilation failed in require at /usr/local/lib/perl/5.10.1/Class/MO +P.pm line 114. # at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 120 # Class::MOP::__ANON__('Can\'t use an undefined value as a HASH re +ference at /usr/loc...') called at /usr/local/share/perl/5.10.1/Try/T +iny.pm line 100 # Try::Tiny::try('CODE(0x1caaa50)', 'Try::Tiny::Catch=REF(0x1d9bfa +0)') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 125 # Class::MOP::load_first_existing_class('Catalyst::Exception::Basi +c') called at /usr/local/lib/perl/5.10.1/Class/MOP.pm line 137 # Class::MOP::load_class('Catalyst::Exception::Basic', undef) call +ed at /usr/local/lib/perl/5.10.1/Moose/Util.pm line 113 # Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0x1c91798 +)', undef, 'Catalyst::Exception::Basic') called at /usr/local/lib/per +l/5.10.1/Moose/Util.pm line 91 # Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0x1c91798) +', 'Catalyst::Exception::Basic') called at /usr/local/lib/perl/5.10.1 +/Moose.pm line 58 # Moose::with('Moose::Meta::Class=HASH(0x1c91798)', 'Catalyst::Exc +eption::Basic') called at /usr/local/lib/perl/5.10.1/Moose/Exporter.p +m line 359 # Moose::with('Catalyst::Exception::Basic') called at /usr/local/s +hare/perl/5.10.1/Catalyst/Exception.pm line 50 # require Catalyst/Exception.pm called at /usr/local/share/perl/5. +10.1/Catalyst/Test.pm line 7 # Catalyst::Test::BEGIN() called at /usr/local/share/perl/5.10.1/C +atalyst/Exception.pm line 0 # eval {...} called at /usr/local/share/perl/5.10.1/Catalyst/Excep +tion.pm line 0 # require Catalyst/Test.pm called at (eval 4) line 2 # main::BEGIN() called at /usr/local/share/perl/5.10.1/Catalyst/Ex +ception.pm line 0 # eval {...} called at /usr/local/share/perl/5.10.1/Catalyst/Excep +tion.pm line 0 # eval 'package main; # use Catalyst::Test @{$args[0]}; # 1; # # ;' called at /usr/local/share/perl/5.10.1/Test/More.pm line 875 # Test::More::_eval('package main;\x{a}use Catalyst::Test @{$args[ +0]};\x{a}1;\x{a}', 'ARRAY(0x13f4f78)') called at /usr/local/share/per +l/5.10.1/Test/More.pm line 850 # Test::More::use_ok('Catalyst::Test', 'BlankSite') called at t/01 +browsing.t line 8 # main::BEGIN() called at /usr/local/share/perl/5.10.1/Catalyst/Ex +ception.pm line 0 # eval {...} called at /usr/local/share/perl/5.10.1/Catalyst/Excep +tion.pm line 0 # Compilation failed in require at /usr/local/share/perl/5.10.1/Cataly +st/Test.pm line 7. # BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Ca +talyst/Test.pm line 7. # Compilation failed in require at (eval 4) line 2. # BEGIN failed--compilation aborted at (eval 4) line 2. Undefined subroutine &main::request called at t/01browsing.t line 10. # Tests were run but no plan was declared and done_testing() was not s +een. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/1 subtests

I'm running on Ubuntu 10.04.

I originally installed Catalyst via Task::Catalyst::Tutorial, and I thought Moose was already installed as a dependency (it says I'm running Catalyst 5.80029 when I start my dev server, which still works btw) but I guess maybe Task::Catalyst::Tutorial installed old versions of things that are now conflicting with each other or something?

I tried install Catalyst::Devel and just plain install Catalyst from cpan to try to see if that would bring everything up to date and get everything compatible again, but both commands just produce page after page of test failures now and won't finish.

What do you recommend to get my system working again? Also, is there a Catalyst forum or somewhere that would be more appropriate for asking Catalyst questions like this? I haven't found one yet. Thanks!

Comment on New Moose install broke Catalyst::Test
Download Code
Re: New Moose install broke Catalyst::Test
by Corion (Pope) on Jan 22, 2011 at 18:58 UTC

    At least you're not alone:

    I would consider to (force-)install an older version of either Moose or Catalyst through the cpan tool. You're doing this on your own Perl and not on the Perl that came with Ubuntu, right?

    If you're using the system-supplied Perl, only install packages through your OS package manager into it (aptitude or apt-get).

    For maintaining a local module installation area with your system Perl, likely, local::lib and/or App::perlbrew will set things up for you.

      I would consider to (force-)install an older version of either Moose or Catalyst ...

      Or simply use the latest versions of all of them (forwards not backwards), works for me

        If "the newest" currently works, that's great too, yes!

        Can you please post your current combination of module versions, so that others can refer to a Known Good combination of the versions?

        I would hope that the Catalyst crew and the Moose members somewhat kept track of what module versions they need, and what features they break, but it seems that they only test against the latest of the greatest and don't pull up their version prerequisites accordingly...

      You're doing this on your own Perl and not on the Perl that came with Ubuntu, right?

      Unfortunately, no. I've been installing everything onto the system Perl, with 'sudo cpan'. I only just heard about local::lib lately and I want to switch to that but I was hoping to fix my system libraries first.

      But my plan now is to give up on the system libraries for now, report the install failures I get for 'install Catalyst' and then switch to local::lib library and try a clean Catalyst install. Is it true that with local::lib I can get Perl to ignore all the modules I've installed as root? I'm also a little nervous about whether it will just work with my Epic configuration in Eclipse (which I am also using) or not. Hopefully I will be able to figure it out.

      Thanks for the help.

Re: New Moose install broke Catalyst::Test
by Anonymous Monk on Jan 22, 2011 at 19:02 UTC
    but I guess maybe Task::Catalyst::Tutorial installed old versions of things that are now conflicting with each other or something?

    No

    What do you recommend to get my system working again?

    Get the latest version of all the modules, report any test failures

Re: New Moose install broke Catalyst::Test
by Khen1950fx (Canon) on Jan 22, 2011 at 20:17 UTC
    I had problems with the installation of Moose also until I discovered that there was a dependency that slipped through the cracks---namespace::autoclean. It was causing some problems for MooseX::Role::WithOverloading. There where quite a few dependency problems, but I managed to put this together. It installed Moose without problems.
    #!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install( "namespace::clean", "namespace::autoclean", "Class::MOP", "Eval::Closure", "Declare::Constraints::Simple", "Package::DeprecationManager", "Sub::Name", "Test::Fatal", "Dist::CheckConflicts", "Data::OptList", "Devel::GlobalDestruction", "List::MoreUtils", "MRO::Compat", "Params::Util", "Scalar::Util", "Sub::Exporter", "Task::Weaken", "Moose", "MooseX::Role::WithOverloading", "Package::Stash::XS", "Package::Stash");

      Wow! This was totally effective. I don't know which exactly it was but a couple of those in that list were not up to date for me and after re-installing all of them my catalyst install ran fine and site tests complete again without failure.

      Thanks a ton!

      (I'm still switching to a local::lib install now.)

      My problem started with the installation of DBIx::Class. I tried running this dependency install script, and everything was up to date except "Declare::Contraints::Simple" which was not found. I discovered that it had a spelling mistake: should be "Declare::Constraints::Simple". It turned out that I did not have this installed, and after installing my test scripts worked again. Thanks a lot for this.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://883697]
Approved by Perlbotics
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-09-23 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (221 votes), past polls