Subject: | CAG seems to lose class values set via set_inherited in a C3::Componentised environment |
The full test suite is attached (tarball as multiple files are
required). Here is the failing part of the test with an explanation:
Comp2 is a simple class which 'use base's Class::C3::Componentised.
First we load_components the 'Base' component which does:
use base qw/Class::C3::Componentised Class::Accessor::Grouped/;
__PACKAGE__->mk_group_accessors ('inherited', 'amount_of_emos');
__PACKAGE__->set_inherited ( amount_of_emos => 6 );
Then we load_components another component 'Extra', which is identical to
Base, except that it provides a different accessor/value.
Here is the test:
ok (Comp2->load_components (qw/Base/), 'Base loaded');
can_ok (Comp2 => 'amount_of_emos');
is (Comp2->amount_of_emos, 6, 'Base accessor has value');
dies_ok (sub { Comp2->amount_of_goths }, 'Extra accessor not there yet');
ok (Comp2->load_components ('Extra'), 'Extra loaded');
can_ok (Comp2 => 'amount_of_emos');
is (Comp2->amount_of_emos, 6, 'Base accessor still has value');
can_ok (Comp2 => 'amount_of_goths');
is (Comp2->amount_of_goths, 666, 'Extra accessor has value');
^^^
This last part fails - the value 666 disappears, even though it is
explicitly set_inherited() in Component::Extra
Subject: | componentised_test.tar.bz2 |
Message body not shown because it is not plain text.