[Bast-commits] r4198 -
DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat
schwern at dev.catalyst.perl.org
schwern at dev.catalyst.perl.org
Fri Mar 14 01:50:05 GMT 2008
Author: schwern
Date: 2008-03-14 01:50:05 +0000 (Fri, 14 Mar 2008)
New Revision: 4198
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/ColumnCase.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/ColumnGroups.pm
Log:
Move code having to do with adding columns out of ColumnCase.
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/ColumnCase.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/ColumnCase.pm 2008-03-14 01:41:32 UTC (rev 4197)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/ColumnCase.pm 2008-03-14 01:50:05 UTC (rev 4198)
@@ -13,8 +13,7 @@
sub add_columns {
my ($class, @cols) = @_;
- $class->mk_group_accessors(column => @cols);
- $class->result_source_instance->add_columns(map lc, @cols);
+ return $class->result_source_instance->add_columns(map lc, @cols);
}
sub has_a {
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/ColumnGroups.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/ColumnGroups.pm 2008-03-14 01:41:32 UTC (rev 4197)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/CDBICompat/ColumnGroups.pm 2008-03-14 01:50:05 UTC (rev 4198)
@@ -24,10 +24,16 @@
sub _add_column_group {
my ($class, $group, @cols) = @_;
+ $class->mk_group_accessors(column => @cols);
$class->add_columns(@cols);
$class->_register_column_group($group => @cols);
}
+sub add_columns {
+ my ($class, @cols) = @_;
+ $class->result_source_instance->add_columns(@cols);
+}
+
sub _register_column_group {
my ($class, $group, @cols) = @_;
More information about the Bast-commits
mailing list