in reply to Re^6: Class::MOP won't load a class!!
in thread Class::MOP won't load a class!!

So to close the loop... I finally got the program to work but the solution is a bit uncouth.

I am able to do a require on all the plugins that I need.

It's a fix for now but I would really like Class::MOP to do the trick. Just makes the program more malleable and maintainable, Not sure why it would not load a module when require does it perfectly well.....

Replies are listed 'Best First'.
Re^8: Class::MOP won't load a class!!
by Wolfgang (Novice) on Nov 20, 2009 at 13:09 UTC

    Similar problem here. I'm missing 'new' in my new Moose class. Unfortunately in my case require 'Moose::Object.pm' does not work:

    Can't locate Moose::Object.pm in @INC (@INC contains: ... c:/xampp/perl/site/lib c:/xampp/perl/lib .)

    Any other ideas?

    Without the require I get:
    Wolfgang 14:07:08 /cygdrive/d/projekte/superclix/Bender/trunk $perl script/test.pl D:/projekte/superclix/dmklib/trunk/lib D:/projekte/superclix/Bender/trunk/lib c:/xampp/perl/site/lib c:/xampp/perl/lib . Can't locate object method "new" via package "Bender::Util::Check" (pe +rhaps you forgot to load "Bender::Util::Check"?) at script/t est.pl line 6.
    The offending code looks like this:
    BEGIN{ print join("\n",@INC,''); } use Bender::Util::Check; my $check=new Bender::Util::Check();
    Wolfgang

      Looks to me like your Moose install is broken somehow.

      -stvn
      require 'Moose::Object.pm' does not

      You have a file named 'Moose::Object.pm'? That is crazy, stick with modules

      require Moose::Object;