[rt-devel] User.pm vs Users.pm

Ruslan U. Zakirov cubic at acronis.ru
Tue Jan 27 10:48:45 EST 2004


William George wrote:
> In reference to "Users" vs "User", "TIckets" vs "Ticket" .pm modules, Tina asks:
> 
> 
>>But why do you seperate between singular and plural?
> 
> 
> Took me a while to get this but here's my take:
> 
> The singulars are direct maps to the Database tables and are primarily used to interface to DBIx::SearchBuilder; they correspond to record definitions. The plurally named modules deal with collections and groups of records
> 
> I suppose that a table is a collection of records, therefore the plurality.
> 
> Between that and the capitalization means I never can correctly type the table name the first time.

RT::Users ISA RT::SearchBuilder ISA (DBIx::SearchBuilder RT::Base)
	allow walk through collection of rows
	apply limits
	join with different tables
	change order

RT::User ISA RT::Record ISA (RT::Base DBIx::SearchBuilder::Record)
	represent row
	allow transparent interface of get/set op with different checks.

SeeAlso DBIx::SearchBuilder

> 
> Bill George
> RT Mission Control
> Vonage.com
> 





More information about the Rt-devel mailing list