Mercurial > pub > Impl
diff Lib/Schema/DataSource/CDBIBuilder.pm @ 166:4267a2ac3d46
Added Class::Template,
Rewritten SQL::Schema
'use parent' directive instead of 'use base'
author | wizard |
---|---|
date | Sat, 23 Apr 2011 23:12:06 +0400 |
parents | 16ada169ca75 |
children |
line wrap: on
line diff
--- a/Lib/Schema/DataSource/CDBIBuilder.pm Sat Apr 23 23:06:48 2011 +0400 +++ b/Lib/Schema/DataSource/CDBIBuilder.pm Sat Apr 23 23:12:06 2011 +0400 @@ -64,7 +64,7 @@ $text = <<ModuleHeader; #autogenerated script don't edit package ${prefix}DBI; -use base 'Class::DBI'; +use parent 'Class::DBI'; require DateTime; @@ -217,7 +217,7 @@ my $tableName = $this->{$PropertyTables}->{$prop->Name}->Name; my $parentName = $this->GenerateClassName($prefix); my $text .= "package $packageName;\n"; - $text .= "use base '$baseModule';\n\n"; + $text .= "use parent '$baseModule';\n\n"; $text .= "__PACKAGE__->table('`$tableName`');\n"; $text .= "__PACKAGE__->columns(Essential => qw/_id parent value/);\n"; $text .= "__PACKAGE__->has_a( parent => '$parentName');\n"; @@ -268,7 +268,7 @@ my $listColumns = join ',', map { '\''. $_->Name . '\''} $this->{$Table}->Columns; $text .= "package $packageName;\n"; - $text .= "use base '$baseModule'". ($this->{$Class}->Name->Name eq 'Map' ? ',\'CDBI::Map\'' : '' ).";\n\n"; + $text .= "use parent '$baseModule'". ($this->{$Class}->Name->Name eq 'Map' ? ',\'CDBI::Map\'' : '' ).";\n\n"; $text .= "__PACKAGE__->table('`$tableName`');\n"; $text .= "__PACKAGE__->columns(Essential => $listColumns);\n";