[Dbix-class] Problem with column_info_from_storage

Brandon Black blblack at gmail.com
Mon Oct 16 21:25:37 CEST 2006


On 10/16/06, Rolf Schaufelberger <rs at plusw.de> wrote:
>
>
> and force it to "ignore" this column, but without success.
> Now I would like to know what is this  column_info_from_storage
> good for and why does the souce tell, it will be removed in 1.0 ?


column_info_from_storage is something DBIC has done by default for a number
of versions now.  Basically, if you don't provide the column info yourself,
it would try to guess it by querying the database itself.  The only way to
disable this feature was to provide a column info hashref which included the
key "datatype" (that's why your other two examples didn't succeed in
disabling it, you needed datatype in there for that to work).

The feature has proved problematic for a lot of edge cases (such as yours),
so we'd like to kill this feature, but on the other hand we don't want to
unexpectedly break existing users that might be relying on it in the middle
of a stable cycle.

As a result, in 0.07002 we added ->column_info_from_storage(0) as a way to
disable it per-source when you have problems.  In 0.08xxx, the behavior will
change from defaulting on to default off (that is, if you really want it
enabled, you'll have to specify ->column_info_from_storage(1)), and in
1.0it will finally go away completely.



Btw. the starting time for my app is now about 2 seconds with 58 tables
> which
> is ,ehm, a bit slow ...


It used to be even slower.  The profiler will probably tell you a lot of
time is spent in Class::C3 and Algorithm::C3, which we're slowly working on
speeding up.  One trick that has helped some in the past is to make a base
class for all of your sources that loads the components (instead of
->load_components(qw/Core/) in every source, they just use base on a shared
base class that does this).

-- Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/dbix-class/attachments/20061016/8624ddc9/attachment.htm 


More information about the Dbix-class mailing list