in reply to MySQL / DBI / OOP

What I recommend is to make a function that encapsulates inserting the new object in the database. That looks good, but it would be even more convenient to make a function you can call like so:

my $new_prospect_id = &insert_new_object($param1, $param2, $param3);

OR

If you want to stay OO, give the prospect object a method insert() that you can call to finally execute the sql statement at the end!

$new_prospect_id = $prospect->insert();



-mr.dunstan