Re: set_sql with __TABLE__ and multi-level inheritance

[prev] [thread] [next] [Date index for 2005/03/27]

From: Tony Bowden
Subject: Re: set_sql with __TABLE__ and multi-level inheritance
Date: 10:13 on 27 Mar 2005
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

set_sql with __TABLE__ and multi-level inheritance
Thomas L. Shinnick 02:22 on 27 Mar 2005

Re: set_sql with __TABLE__ and multi-level inheritance
Tony Bowden 10:13 on 27 Mar 2005

Re: set_sql with __TABLE__ and multi-level inheritance
Thomas L Shinnick 22:23 on 27 Mar 2005

Generated at 14:42 on 11 Apr 2005 by mariachi v0.52