[Catalyst] More complex Class::DBI::Sweet usage?

Sebastian Riedel sri at oook.de
Fri Jul 1 19:12:28 CEST 2005


Am 01.07.2005 um 16:44 schrieb Andreas Marienborg:

>
> On 1. jul. 2005, at 16.32, Perrin Harkins wrote:
>
>
>> On Fri, 2005-07-01 at 12:06 +0100, Toby Corkindale wrote:
>>
>>
>>> This is where the confusion occured - since everything uses  
>>> Catalyst::Model::*
>>> I figured I should be naming my packages under the "Model"  
>>> namespace, rather
>>> than the "M" namespace. I knew aliases existed so you can access  
>>> things via
>>> either method, but I figured that the actual packages themselves  
>>> should be
>>> "model" and the "m" version was the alias - not the other way round!
>>>
>>>
>>
>> Several people on the list (see the CRUD discussion) seem to have  
>> been
>> tripped up by this.  I'd suggest either dropping the aliasing  
>> feature or
>> documenting the places where you should say M and where you should  
>> Model
>> very carefully.
>>
>> - Perrin
>>
>
> The way I do it is to just choose one, then stick to it. AFAIK they  
> arent aliases per se, just two different namespaces, used for the  
> same thing. I prefer just using M everywhere, and have never had  
> problems with stuff like this.

Exactly! No aliases, just namespaces.
Most people prefered the short version, so it's the default, thats  
all. :)

--
sebastian




More information about the Catalyst mailing list