> We store passwords encrypted in a tables field. We use the MySQL aes_encrypt > an aes_decrypt functions to store and retrieve information from that column. > The problem is, that DBIx::Class does not implement this kind of attaching a > sql function to a field. At least it does not supply a way to have different > sql functions called for storage and retrieval.
You CAN do this. Please see Cookbook: http://search.cpan.org/~jrobinson/DBIx-Class-0.08009/lib/DBIx/Class/Manual/Cookbook.pod#Using_database_functions_or_stored_procedures also: $row->password(\"FUNCTION('${password}')"); or override set_column to do this bit for you. sub set_column{ my($self,$column, $value) = @_; if($column eq 'password' && defined $value ){ $value = \'FUNCTION( "'.$value.'")'; } $self->next::method($column, $value); } --Guillermo Roditi (groditi) _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
