in reply to Moose: inherited attributes

Moose's error messages are notoriously bad. There's often a helpful line, but it's usually buried in a hundred other unhelpful ones.

You haven't shown any source code, so the best I can do is take a wild stab in the dark.

One biggish change between Moose 2.08 and 2.12 is the way that Moose decides whether a class is loaded or not. In older versions of Moose it used various interesting heuristics. In newer versions it uses the simpler policy of checking %INC.

Your VS::Payload::Postal class inherits from some base class. Is this base class in an appropriately named module file - i.e. if the base class is called Foo::Bar, then is it defined in a file called "Foo/Bar.pm", and stored in a directory listed in @INC?

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^2: Moose: inherited attributes
by rootcho (Pilgrim) on Jan 12, 2014 at 02:37 UTC
    thanks. .No the file names match..
    That is how the code looks..
    VS::Payload has 'obj_templates', is => 'rw', isa => 'HashRef'; VS::Payload::Postal has '+obj_templates', is => 'rw', default => sub{{ .... }};

    It works if I change it to this :
    VS::Payload #has 'obj_templates', is => 'rw', isa => 'HashRef'; VS::Payload::Postal has 'obj_templates', is => 'rw', default => sub{{ .... }};

    i.e. it behaves as if I have not declared anything in the parent class.