Re: set_sql with __TABLE__ and multi-level inheritance
[prev]
[thread]
[next]
[Date index for 2005/03/27]
On Sat, Mar 26, 2005 at 08:22:16PM -0600, Thomas L. Shinnick wrote:
> But if the set_sql() call was from MyCDBI, then won't there be only one
> such named method, MyCBDI::sql_deleteAllRecords(), and then the __TABLE__
> value is permanently set by the first use of the method?
No. This is exactly what __TABLE__ etc are for - writing your SQL in a
generic enough way to work no matter which class they're called from.
It's perfectly safe. All the SQL inside Class::DBI itself works this way
too.
Tony
|
|
Re: set_sql with __TABLE__ and multi-level inheritance
Tony Bowden 10:13 on 27 Mar 2005
|