This queue is for tickets about the Coat CPAN distribution.

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

People
Owner:
Nobody in particular
Requestors:
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.1_0.6
Fixed in:
(no value)



Subject: Coat does not know about an extends class if the class has never been used
All the examples of using 'extends' show situations where the class has already been used. If we convert the Point example to have the modules in separate files: Point.pm: package Point; use Coat; has 'x' => ( isa => 'Int', default => 0); has 'y' => ( isa => 'Int', default => 0); 1; Point3D.pm: package Point3D; use Coat; extends 'Point'; has 'z' => ( isa => 'Int', default => 0); 1; When you construct Point3D Coat reports: Class 'Point' is unknown, cannot extends at /usr/lib/perl5/site_perl/5.8.8/Coat.pm line 247 Coat::_extends_class('ARRAY(0x82f6ce4)', 'Point3D') called at /usr/lib/perl5/site_perl/5.8.8/Coat.pm line 77 Coat::extends('Point') called at ............... Changing the Point3D module to: package Point3D; use Coat; use Point; extends 'Point'; has 'z' => ( isa => 'Int', default => 0); 1; Fixes the issue but this is not in-line with Moose's handling of the situation which does not require the using Point. I'm guessing if Coat does not know about an Object it should be attempting to require/importing it first before extending it.
From: sukria@sukria.net
Show quoted text
> I'm guessing if Coat does not know about an Object it should be > attempting to require/importing it first before extending it.
Exactly, thanks for the report.
Bug closed in version: 0.2


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.