On 07/05/07, Pedro Melo <[EMAIL PROTECTED]> wrote:
Hi,
This is what I want to do: when someone inserts or updates a password
field, I want to sha1_hex'digest it.
I was able to do this overriding both set_column() (for updates) and
insert() (for inserts). Is this the best way?
Should I use the inflate_column instead?
Best regards,
--
Pedro Melo
Blog: http://www.simplicidade.org/notes/
Jabber ID: [EMAIL PROTECTED]
Use Jabber!
You can use DBIx::Class::DigestColumns
__PACKAGE__->load_components(qw/DigestColumns Core/);
__PACKAGE__->digestcolumns(
columns => [qw/password/],
algorithm => 'SHA-1',
encoding => 'hex',
dirty => 1,
auto => 1,
);
--
Jonas
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/