Hi,

I want to get some messages from a database using DBIx::Class, then to pass them to TT, but I also want to make some preformatting before sending to TT.
(I don't know if TT can do what I want).

I did:

@messages = $c->model("Db::Forum")->search({
id_room => $id_room,
},
{
join => "id_user",
prefetch => "id_user",
rows => $c->user->nr_messages || 10,
order_by => 'date desc, time desc',
});

$c->stash->{messages} = [EMAIL PROTECTED];

But I want to replace \n in the body of the messages with <br />, and who knows, maybe other such format changes.

Which is the recommended way of doing this?
Should I loop @messages in the program, get each value, modify it and store it into another array then send it to TT, or there is another more elegant method?

Thank you.

Octavian


_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to