From: Brandon L. Black Date: Tue, 12 Sep 2006 19:18:42 +0000 (+0000) Subject: column_info_from_storage(1) is cleaner anyways X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d99162346719ed25e4e212f1a689d0744f89c3fe;p=dbsrgits%2FDBIx-Class-Historic.git column_info_from_storage(1) is cleaner anyways --- diff --git a/Changes b/Changes index 6985ea7..ba7ca63 100644 --- a/Changes +++ b/Changes @@ -12,7 +12,7 @@ Revision history for DBIx::Class ->exception_action - columns_info_for is deprecated, and no longer runs automatically. You can make it work like before via - __PACKAGE__->load_column_info_from_storage for now + __PACKAGE__->column_info_from_storage(1) for now 0.07002 - cleared up Relationship docs, and fixed some typos diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 4df3fa4..14bc4f8 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -217,15 +217,13 @@ sub column_info { return $self->_columns->{$column}; } -=head2 load_column_info_from_storage +=head2 column_info_from_storage Enables the on-demand automatic loading of the above column metadata from storage as neccesary. This is *deprecated*, and should not be used. It will be removed before 1.0. -=cut - -sub load_column_info_from_storage { shift->column_info_from_storage(1) } + __PACKAGE__->column_info_from_storage(1); =head2 columns diff --git a/lib/DBIx/Class/ResultSourceProxy.pm b/lib/DBIx/Class/ResultSourceProxy.pm index 4d80cba..b596e5c 100644 --- a/lib/DBIx/Class/ResultSourceProxy.pm +++ b/lib/DBIx/Class/ResultSourceProxy.pm @@ -35,8 +35,8 @@ sub column_info { shift->result_source_instance->column_info(@_); } -sub load_column_info_from_storage { - shift->result_source_instance->load_column_info_from_storage; +sub column_info_from_storage { + shift->result_source_instance->column_info_from_storage(@_); } sub columns { diff --git a/t/60core.t b/t/60core.t index a600cb0..b0d7ec6 100644 --- a/t/60core.t +++ b/t/60core.t @@ -277,7 +277,7 @@ ok(!$@, "stringify to false value doesn't cause error"); # test column_info { $schema->source("Artist")->{_columns}{'artistid'} = {}; - $schema->source("Artist")->load_column_info_from_storage; + $schema->source("Artist")->column_info_from_storage(1); my $typeinfo = $schema->source("Artist")->column_info('artistid'); is($typeinfo->{data_type}, 'INTEGER', 'column_info ok'); diff --git a/t/72pg.t b/t/72pg.t index f393a9a..ca67043 100644 --- a/t/72pg.t +++ b/t/72pg.t @@ -15,7 +15,7 @@ use DBICTest; __PACKAGE__->load_components(qw/PK::Auto Core/); __PACKAGE__->table('casecheck'); __PACKAGE__->add_columns(qw/id name NAME uc_name/); - __PACKAGE__->load_column_info_from_storage; + __PACKAGE__->column_info_from_storage(1); __PACKAGE__->set_primary_key('id'); }