in reply to (z) SUPER and Class::DBI
I believe that SUPER:: isn't going to work because that would be trying to call the password method from whatever your class is inheriting from. ie: Class::DBI. (not 100% positive on that). Since the password method is going to exist in your current package, you are overwriting it and SUPER:: will not work.
CDBI uses Class::Accessor to handle the accessor/mutator creation. When it creates an accessor it creates an alias to it called _WHATEVER_accessor. So you can do this instead:
return $self->_password_accessor(@_)However that this will not work when using create or find_or_create. Only for modification. I would go for the trigger option instead. If you are going to use triggers you can use before_create and before_set_password.
The one other method you can do is create a class for the passwords, and then set a has_a relationship for the password column. Since this is a fairly simple task, that may be overkill. But it is something to think about.
-Brad
|
|---|