This queue is for tickets about the Coat CPAN distribution.

Report information
The Basics
Id:
38555
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
andyyatz [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
Critical
Broken in:
0.331
Fixed in:
(no value)



Subject: Extends broken for multiple levels of inheritence
Assuming the following model (where -> means extends): Four -> Three -> Two -> One ( -> implicit Coat::Object extends here) When attempt to assert for default values declared in One via Four we get an undef returned. Looking at the Coat::Meta object during a debug session it looks as if Coat believes the inheritance is: Four -> Three -> Two -> Coat::Object Without understanding the method of inheritance more it seems as if it is Coat::Meta::extends which is at fault or the other parts of the extension tree needs to be added to the $CLASSES->{'@!family'}{$class} hash.
Subject: assert_extends.pl
{ package One; use Coat; has 'one' => (isa => 'Int', is => 'rw', default => 1); package Two; use Coat; extends 'One'; has 'two' => (isa => 'Int', is => 'rw', default => 2); package Three; use Coat; extends 'Two'; has 'three' => (isa => 'Int', is => 'rw', default => 3); package Four; use Coat; extends 'Three'; has 'four' => (isa => 'Int', is => 'rw', default => 4); } use Test::More tests => 4; my $m = Four->new; is($m->four, 4, 'Level 4 return 4'); is($m->three, 3, 'Level 3 return 3'); is($m->two, 2, 'Level 2 return 2'); is($m->one, 1, 'Level 1 return 1');
Hi, Thanks for the report and the test script. This bug is closed in the upcoming new release: 0.333.
closed in 0.333


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.