in reply to Class::DBI - performing action on column before it is used or saved

Class::DBI problems seem to be popular today!

I haven't tried them yet, but according to the doc's Class::DBI has an "add_trigger" method where you specify the trigger point and then give a coderef to execute. Surely this would do wyat you want?

jdtoronto

  • Comment on Re: Class::DBI - performing action on column before it is used or saved

Replies are listed 'Best First'.
Re: Re: Class::DBI - performing action on column before it is used or saved
by duct_tape (Hermit) on Dec 19, 2003 at 20:53 UTC

    Yes they do! Apparently I was replying to your question while you were replying to mine. :)

    I have been playing with the triggers and they work for the most part. The main problem I am having with them in this situation is that they are not called in the search methods of CDBI. So for instance I can't do something like this:

    my $obj MyModule->search(password => 'blahblah');

    Because the trigger for 'select' hasn't been called so it is literally checking the string 'blahblah' against the encrypted password in the database. :/