[Maypole] has_a display name
Simon Cozens
simon@simon-cozens.org
Thu, 3 Jun 2004 23:08:33 +0100
Jesse Sheidlower:
> package SFBooksDB::Author;
> #other stuff...
>
> sub stringify_self {
> my $self = shift;
> return join " ", $self->firstname, $self->secondname, $self->surname;
> }
This is correct; however, if it's just a simple column, you can use
Class::DBI's ordinary columns( Stringify => ... ) mechanism.
Maypole::Model::CDBI will look for columns called name, title or any primary
column not called "id" in the absence of another stringify column.
--
Term, holidays, term, holidays, till we leave school, and then work, work,
work till we die.
-- C.S. Lewis