Re: CDBI::mysql->column_type unusable because CDBI->column_type deprecated

[prev] [thread] [next] [Date index for 2004/11/19]

From: Peter Speltz
Subject: Re: CDBI::mysql->column_type unusable because CDBI->column_type deprecated
Date: 09:06 on 19 Nov 2004
--- Tony Bowden <tony-cdbitalk@xxxxx.xxx> wrote:

> On Thu, Nov 18, 2004 at 10:42:27PM -0800, Peter Speltz wrote:
> > Ran into this problem trying to use column_type method.  CDBI->mysql method
> of
> > that name does what i want but i can't use it because CDBI->column_type
> used to
> > be CDBI->has_a and is now  deprected.  
> 
> I don't understand the problem.
> 
> Just because a method is deprecated in the parent, that doesn't mean
> that a subclass can't redefine it to do what it wants...
> 
Hmm. Well, that's what i thought but this is what's happening: 
I use CDBI::Loader to make my classes. It makes each class a Class::DBI::mysql.
I'm not sure exactly how everything works but in any of my model classes, when
I call  MyClass->column_type($col) 
I get the Class::DBI column_type deprecated error. 

Maybe the problem is with Loader?

I changed the Class::DBI::mysql method name to mycolumn_type and it works fine
and I'm using that for now. 

> > Is it time to undeprecate column_type and let the driver's have that method
> to
> > do the right thing?
> 
> That would be worse. Unless you don't mean by undeprecate what I do...
> 

I don't know what you mean by it, but if I just want to be able to call
column_type from my classes that are based on Class::DBI::mysql :)

> Tony
> 
> 
> 


=====
pjs


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 

Re: CDBI::mysql->column_type unusable because CDBI->column_type deprecated
Peter Speltz 09:06 on 19 Nov 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52