Skip Menu |

This queue is for tickets about the Class-Trait CPAN distribution.

Report information
The Basics
Id: 15969
Status: resolved
Priority: 0/
Queue: Class-Trait

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.10
Fixed in: (no value)



Subject: Every trait consumes a top level namespace...
Needless to say, having every single trait consuming a top level namespace is probably a bad thing... Why aren't they Class::Trait::TSomething, like their actual location in lib, and then you can use them in the shorthand form if you want?
[ADAMK - Sat Nov 19 23:49:37 2005]: Show quoted text
> Needless to say, having every single trait consuming a top level > namespace is probably a bad thing... > > Why aren't they Class::Trait::TSomething, like their actual location > in lib, and then you can use them in the shorthand form if you want? >
There are a couple of points to consider here: 1. Only the built-in traits of TEquality, TComparable and TPrintable consume a top-level namespace. 2. The are not loaded unless requested. 3. I'm trying to maintain backwards compatability. It's item #3 which causes a problem with trying to change this. If I use your method of dealing with this, then this breaks: if ($some_class->does('TPrintable')) { ... } While I don't know how likely this is to impact someone, I think the odds of anyone accidentlly using 'TPrintable' as a class name are vanishingly small (probably smaller than the odds of me breaking someone's code if I change things). If you can convince me of a good reason to change things, I probably will. Until then, I think I'll leave things as-is. Cheers, Ovid